home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / networking / terms / kermit / b / ikxker.lpt < prev    next >
Encoding:
Text File  |  1993-06-25  |  158.5 KB  |  2,522 lines

  1. 0
  2. 0
  3. 0
  4. 0
  5. 0
  6. 0
  7. 0
  8. 0
  9.                      IBM SYSTEM/370 CICS KERMIT USER'S GUIDE
  10. 0
  11.                                    VERSION 4.2
  12. 0
  13.                                   John Chandler
  14. 0                  Harvard/Smithsonian Center for Astrophysics
  15. 0                                 May 26, 1993
  16. 0
  17. 0                           Copyright (C) 1981, 1993
  18.              Trustees of Columbia University in the City of New York
  19. 0     Permission is granted to any individual or institution to use, copy,
  20.      or redistribute this document so long as it is not sold for profit, and
  21.                    provided this copyright notice is retained.
  22. 1IBM System/370 Kermit                                                    Page i
  23. 0-------------------------------------------------------------------------------
  24.                                 Table of Contents
  25. 01. IBM 370 KERMIT                                                             1
  26. 0   1.1. Translation Tables                                                    2
  27.     1.2. File Attributes                                                       6
  28.     1.3. Program Operation                                                     7
  29.     1.4. Kermit-370 Subcommands                                                9
  30.     1.5. Before Connecting to the Mainframe                                   31
  31.     1.6. Trouble-shooting Protocol Converters                                 32
  32.     1.7. After Returning from Kermit-370                                      35
  33.     1.8. What's New                                                           36
  34.     1.9. What's Missing                                                       37
  35.     1.10. Further Reading                                                     38
  36. 02. IBM CICS KERMIT                                                           39
  37. 0   2.1. CICS Data Objects                                                    40
  38.     2.2. Program Operation                                                    43
  39.     2.3. Kermit-CICS Subcommands                                              45
  40.     2.4. How to build an executable Kermit-CICS                               50
  41.     2.5. What's Missing                                                       51
  42. 0Index                                                                        52
  43. 1IBM System/370 Kermit                                                   Page ii
  44. 0-------------------------------------------------------------------------------
  45.                                  List of Tables
  46. 0   Table 1-1:   Allowed character set combinations in Kermit-370              4
  47.     Table 1-2:   EBCDIC (hexadecimal) code points for LATIN1                   5
  48.     Table 1-3:   Character graphics for EBCDIC codes                           7
  49.     Table 1-4:   Error messages and codes for Kermit-370                      36
  50. 11. IBM 370 KERMIT                                                        Page 1
  51. 0-------------------------------------------------------------------------------
  52.  1. IBM 370 KERMIT
  53. 0Program:       John  Chandler  (Harvard/Smithsonian  Center  for Astrophysics);
  54.                 contributions from Vace Kundakci and Daphne Tzoar (Columbia  U),
  55.                 Bob  Shields  (U.  Maryland),  Greg  Small  (UC Berkeley), Clark
  56.                 Frazier (Harvard Bus. Sch.), Bob  Bolch  and  Steve  Blankinship
  57.                 (Triangle),  Ron  Rusnak  (U.  Chicago),  Roger  Fajman and Dale
  58.                 Wright (NIH), Andre Pirard (U. Liege),  Pierre  Goyette  (McGill
  59.                 U.)
  60.  Language:      IBM 370 Assembler
  61.  Documentation: John Chandler (CfA)
  62.  Version:       4.2.3
  63.  Date:          1993 May
  64. 0Kermit-370  is  a  family  of  programs  implementing  the KERMIT file transfer
  65.  protocol for IBM 370-series mainframes (System/370,  303x,  43xx,  308x,  3090,
  66.  etc.)  under  a  variety  of  operating  systems.    Kermit-370  operates  over
  67.  asynchronous ASCII communication lines attached to a 3705-style or protocol en-
  68.  veloping  3708  front  end  ("TTY" or line-mode devices), to a Series/1 or 4994
  69.  running the Yale ASCII Terminal Communication System  or  the  IBM  7171  ASCII
  70.  Device  Control Unit or a 9370 with ASCII subsystem ("SERIES1" devices), to the
  71.  IBM 3174 protocol converter at level B2.0 or  higher  ("AEA"  devices),  or  to
  72.  front-ends with graphics pass-through mode, such as the Datastream/Leedata 8010
  73.  and PCI 1076 ("GRAPHICS" devices).  As of this writing, the  pending  implemen-
  74.  tation  of  full(er)  7171 compatibility in the program product SIM3278 has not
  75.  been completed.    The  non-line-mode  devices  are  often  called  full-screen
  76.  devices.  For more details on front ends, see the section SET CONTROLLER.
  77. 0The  source is coded in IBM 370 assembly language and is compatible with the F,
  78.  VS, and H assemblers.  The code is divided into sections, some generic and some
  79.  specific  to  an individual operating system.  While the details of file-system
  80.  and supervisor interaction vary widely among  the  systems  available  for  IBM
  81.  370's, the basic features are essentially the same.  This chapter describes the
  82.  features common to all variants of Kermit-370, and a separate chapter will deal
  83.  with the system-specific details for each variant.
  84. 0IBM  370 systems have some peculiarities that users should be aware of.  First,
  85.  these systems are essentially half-duplex; the communication  line  must  "turn
  86.  around"  before  any  data  can  be  sent.    The  "TTY"  devices  are strictly
  87.  half-duplex, and even the "SERIES1", "GRAPHICS", and  "AEA"  devices,  although
  88.  they  maintain  full-duplex  communication  with  the terminal, must transmit a
  89.  block at a time to the mainframe.  The fact that a  packet  has  been  received
  90.  from the IBM system through a "TTY" device is no guarantee that it is ready for
  91.  a reply; generally, the true indicator of  readiness  is  the  line  turnaround
  92.  character  (XON), which the operating system sends immediately before issuing a
  93.  read request.  On some systems, however, it is possible for Kermit to  do  away
  94.  with  the  system-supplied  turnaround  and  schedule read requests immediately
  95.  after the corresponding writes.  It is up to the user to tell the other  Kermit
  96.  how it must conform to the requirements of the IBM mainframe.
  97. 0A  second distinction is that disk files are encoded using the EBCDIC character
  98.  set.  Consequently, there are three layers of character translation on  packets
  99.  exchanged  on  a  "TTY"  device.    For  an incoming packet, the outer layer is
  100.  provided by the operating system, which translates all characters from ASCII to
  101.  EBCDIC.    Kermit-370 must then translate the packets back to ASCII (the middle
  102.  layer) in order to calculate and verify the checksum.  Data arriving through  a
  103. 11. IBM 370 KERMIT                                                        Page 2
  104. 0-------------------------------------------------------------------------------
  105.  "SERIES1",  "GRAPHICS", or "AEA" device are still in ASCII and therefore bypass
  106.  the two outer layers.  In any case, Kermit-370 translates  text  files  finally
  107.  into  EBCDIC (the inner layer) before storing on disk.  When Kermit-370 sends a
  108.  file, the opposite translations occur.  The middle-layer tables used by  Kermit
  109.  must  be  the  inverses  of the corresponding outer-layer ones used by the host
  110.  operating system if file transfers are to work at all.  If necessary, the  sys-
  111.  tem  programmer  should  add the appropriate SET TATOE/TETOA/TTABLE subcommands
  112.  (q.v.)  to the global INIT file.  Indeed, it is usually  a  good  idea  to  set
  113.  TTABLE  ON  in  the  global INIT file to force using different built-in sets of
  114.  tables for the inner and middle layers whenever the system has  "TTY"  devices.
  115.  The standard 7-bit ASCII-to-EBCDIC translations can be found in the Appendix or
  116.  the IBM System/370 Reference Card.  See the section  "Translation  Tables"  for
  117.  more details.
  118. 0Another  distinction  of  IBM  370's  is  that they store and retrieve files as
  119.  records rather than byte streams.  Records may be either fixed-length with some
  120.  sort of padding (as needed) or varying-length with some sort of (generally hid-
  121.  den) delimiters.  Thus, Kermit-370 must assemble  incoming  data  packets  into
  122.  records  by  stripping  off carriage return-linefeed pairs (CRLF's) and padding
  123.  with blanks or truncating as needed and must strip trailing blanks  and  append
  124.  CRLF's to outgoing records.  (See the SET FILE TYPE subcommand.)  Further, disk
  125.  files typically have the records combined into blocks for efficiency.  One con-
  126.  sequence  of  this form of storage is that files have attributes describing the
  127.  component records: maximum record length (LRECL), record  format  (RECFM),  and
  128.  sometimes block size (BLKSIZE).
  129. 0As  mentioned before, Kermit-370 is a family of programs.  At present, only the
  130.  CMS, TSO, MUSIC, ROSCOE, and CICS variants are operational.  Variants for DOS-4
  131.  and MTS have at least reached the "drawing board," but no others have even been
  132.  started as of this writing.  Volunteers are always welcome to  port  Kermit-370
  133.  to  other operating systems or add new features to the existing family.  Anyone
  134.  interested should first get in touch with the Center for  Computing  Activities
  135.  at  Columbia  University  to find out what projects of a similar nature are al-
  136.  ready pending (and thereby prevent unnecessary duplication of effort).    There
  137.  are  supplemental  files in the Kermit distribution with explanations of how to
  138.  go about porting Kermit-370 and how to add support for new terminal  controller
  139.  types.    For  details, refer to the installation guide for the variant of your
  140.  choice.
  141. 0
  142.  1.1. Translation Tables
  143. 0Traditionally, IBM mainframe Kermits have translated 7-bit ASCII characters  to
  144.  8-bit   EBCDIC  characters  and  ignored  the  "parity"  bit  in  the  process.
  145.  Similarly, the 8-bit EBCDIC characters  have  been  mapped  onto  7-bit  ASCII,
  146.  thereby  producing  many  ambiguities  in  translating  the ASCII files back to
  147.  EBCDIC.  These ambiguities fall into  two  categories:  EBCDIC  characters  not
  148.  representable  in ASCII have been rendered as ASCII nulls, and alternate EBCDIC
  149.  representations of characters such as the  ASCII  backslash  have  been  mapped
  150.  together,  but  at  least no two 7-bit ASCII characters are translated into the
  151.  same EBCDIC character.  The ambiguities were tolerable  in  environments  where
  152.  the  traditionally  non-printable  characters never occurred in text files, but
  153.  text processing has increasingly tended to include such  characters  for  math-
  154.  ematical  formulas or for languages other than English.  Ultimately, the trans-
  155.  lation tables must become completely invertible, lest information  be  lost  in
  156.  the  transfer.    There  has long been an option to replace parts of the trans-
  157. 11.1. Translation Tables                                                  Page 3
  158. 0-------------------------------------------------------------------------------
  159.  lation tables via commands from the user (or imbedded in the INIT  files),  but
  160.  such  replacements were always supported locally and were, therefore, basically
  161.  non-standard.
  162. 0The concept of standard translations is currently in a state of flux because of
  163.  the  proliferation  of 8-bit code pages and the countervailing efforts at stan-
  164.  dardization among groups such as the ISO and Kermit developers.  In particular,
  165.  Kermit-370  now  supports  a set of EBCDIC and "extended ASCII" code pages with
  166.  built-in translation tables and automatic identification of the "ASCII"  trans-
  167.  fer  character  set via Attribute packets.  This facility supports files stored
  168.  using numerous IBM Country Extended Code  Pages  and  permits  transfers  using
  169.  character  sets  ASCII,  CYRILLIC,  GREEK, HEBREW, JAPAN-EUC, KATAKANA, LATIN1,
  170.  LATIN2, LATIN3, and THAI.  See Table 1-1 for a display of the allowed  combina-
  171.  tions  of  character  sets.  See also file ISOK7.TXT in the Kermit distribution
  172.  for a somewhat outdated description of the  protocol  extensions.    Kermit-370
  173.  currently supports text files in the following languages:  Afrikaans, Albanian,
  174.  Bulgarian, Byelorussian, Catalan,  Czech,  Croatian,  Danish,  Dutch,  English,
  175.  Esperanto,  Faeroese, Finnish, French, Gaelic, Galician, German, Greek, Hebrew,
  176.  Hungarian, Icelandic, Italian,  Japanese  (Katakana  and  Kanji),  Lao,  Latin,
  177.  Macedonian, Maltese, Norwegian, Polish, Portuguese, Quechua, Romanian, Russian,
  178.  Serbian, Slovak, Slovene, Spanish, Swahili, Swedish, Thai, Turkish,  Ukrainian,
  179.  and Volapuk.  Visual representations of the characters sets may be found in the
  180.  ISO register (for transfer) and in various IBM  documents,  such  as  S544-3156
  181.  "About Type" (for files).
  182. 0As  nearly as possible, the tables in Kermit-370 are invertible, but all of the
  183.  character sets reserve many (typically 65) code points for  control  characters
  184.  and  leave them officially undefined and unprintable.  This applies both to IBM
  185.  code pages and ISO standard 8-bit character sets.  Although 33 of the  controls
  186.  have widely accepted mappings, the others do not, and Kermit-370 currently uses
  187.  those given in an appendix of IBM's VS/Fortran Reference Manual.   Needless  to
  188.  say, such translations are arbitrary and may be invalidated by future decisions
  189.  at IBM or ISO.  Still, most of the translations are likely to be stable in  the
  190.  long run.  Table 1-2 shows the current translation from LATIN1 to EBCDIC, which
  191.  is likely to be the most often used.  Other translations, including the reverse
  192.  ones, may be displayed using the TDUMP subcommand of Kermit-370.
  193. 0Besides converting files for transmission, Kermit-370 must also  compensate for
  194.  the EBCDIC/ASCII translation performed by some front ends and must,  therefore,
  195.  be able to apply the exact reverse translations on both input and output.  This
  196.  is the "middle layer" of translation described earlier for "TTY" devices.  Con-
  197.  sider  the  fate  of  a Left Square Bracket character in an inbound packet on a
  198.  "TTY" line.  It begins as ASCII code x'5B' (91  decimal),  but  the  front  end
  199.  translates  it  to EBCDIC before presenting it to Kermit-370.  In this example,
  200.  suppose it becomes EBCDIC code x'4A' (74 decimal) instead of the standard x'AD'
  201.  (173  decimal).    Then,  Kermit must be primed with a SET TETOA 74 91 so that,
  202.  when reconstructing the original ASCII  packet,  the  character  becomes  x'5B'
  203.  again.   Otherwise, the packet checksum will appear invalid.  Kermit comes with
  204.  a pair of default tables, but it may be necessary to customize  them,  as  this
  205.  example  shows.    The following procedure will reveal any changes needed.  The
  206.  procedure has two stages: the first is for any line-mode  front  end,  and  the
  207.  second only for front ends capable of full 8-bit data transfer.  Note that, al-
  208.  though the discussion refers to hexadecimal values, the Kermit-370 SET  subcom-
  209.  mands  require  decimal  numeric arguments.  Also, note that this procedure as-
  210.  sumes you will run  Kermit  with  TTABLE  set  on;  hence,  the  references  to
  211.  Kermit-370  tables  are  to  TATOE and TETOA.  If you choose to define Kermit's
  212. 11.1. Translation Tables                                                  Page 4
  213. 0-------------------------------------------------------------------------------
  214.  -------------------------------------------------------------------------------
  215. 0
  216.                              Transfer character set
  217. 0  Local  ASCII CYRILLIC GREEK HEBREW JAPAN KATAK.  L1 L2 L3 THAI
  218. 0 CP037     *                                       **
  219.   CP273                                             **
  220.   CP275                                             **
  221.   CP277                                             **
  222.   CP278                                             **
  223.   CP280                                             **
  224.   CP281                                 *           **
  225.   CP282                                             **
  226.   CP284                                             **
  227.   CP285                                             **
  228.   CP290                                 *     **
  229.   CP297                                             **
  230.   CP424                          **
  231.   CP500     *                           *           **
  232.   CP838                                                       **
  233.   CP870                                                **
  234.   CP871                                             **
  235.   CP875                    **
  236.   CP880     *      **
  237.   CP905                                                   **
  238.   CZECH                                                 *
  239.   DKOI      *      ***
  240.   EBCDIC    **                                     ***
  241.   H-EBCD                                *      *
  242.   KANJI                                 *
  243. 0         Table 1-1:  Allowed character set combinations in Kermit-370
  244. 0All   allowed  combinations  are  marked  with  asterisks,  and  the  preferred
  245.  combination in each row or column is the one with the most asterisks.  Whenever
  246.  a  character  set is specified, either directly or through an Attribute packet,
  247.  the other category of character set is checked to see if it makes up an allowed
  248.  combination.  If not, it is forced to the preferred character set.
  249. 0
  250.  -------------------------------------------------------------------------------
  251. 0file translation to match that of the front end, you should  leave  TTABLE  set
  252.  off  and  remove  the  T's from the SET subcommands described below.  This will
  253.  also turn off the automatic switching of translation tables  according  to  the
  254.  Attribute  packets received from the other Kermit.  Under CMS, you must issue a
  255.  CMS SET INPUT and a CMS SET OUTPUT before starting this procedure.
  256. 0   1. Create a file containing all the non-control EBCDIC characters  (hex
  257.        codes  40-FF)  and  display the file on any available ASCII terminal
  258.        hooked up to the line-mode front end in question.
  259. 0   2. If any printable ASCII character is missing from the display, Kermit
  260.        cannot  work through this front end (unless you modify the tables in
  261. 11.1. Translation Tables                                                  Page 5
  262. 0-------------------------------------------------------------------------------
  263.  -------------------------------------------------------------------------------
  264. 0
  265.        -0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -A -B -C -D -E -F
  266. 0  0-  00 01 02 03 37 2D 2E 2F 16 05 25 0B 0C 0D 0E 0F
  267.    1-  10 11 12 13 3C 3D 32 26 18 19 3F 27 1C 1D 1E 1F
  268.    2-  40 5A 7F 7B 5B 6C 50 7D 4D 5D 5C 4E 6B 60 4B 61
  269.    3-  F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 7A 5E 4C 7E 6E 6F
  270.    4-  7C C1 C2 C3 C4 C5 C6 C7 C8 C9 D1 D2 D3 D4 D5 D6
  271.    5-  D7 D8 D9 E2 E3 E4 E5 E6 E7 E8 E9 AD E0 BD 5F 6D
  272.    6-  79 81 82 83 84 85 86 87 88 89 91 92 93 94 95 96
  273.    7-  97 98 99 A2 A3 A4 A5 A6 A7 A8 A9 C0 4F D0 A1 07
  274.    8-  20 21 22 23 24 15 06 17 28 29 2A 2B 2C 09 0A 1B
  275.    9-  30 31 1A 33 34 35 36 08 38 39 3A 3B 04 14 3E FF
  276.    A-  41 AA 4A B1 9F B2 6A B5 BB B4 9A 8A B0 CA AF BC
  277.    B-  90 8F EA FA BE A0 B6 B3 9D DA 9B 8B B7 B8 B9 AB
  278.    C-  64 65 62 66 63 67 9E 68 74 71 72 73 78 75 76 77
  279.    D-  AC 69 ED EE EB EF EC BF 80 FD FE FB FC BA AE 59
  280.    E-  44 45 42 46 43 47 9C 48 54 51 52 53 58 55 56 57
  281.    F-  8C 49 CD CE CB CF CC E1 70 DD DE DB DC 8D 8E DF
  282. 0
  283.              Table 1-2:  EBCDIC (hexadecimal) code points for LATIN1
  284. 0This  table  shows  the values of the EBCDIC equivalents for the code points in
  285.  the LATIN1 character  set.    The  values  are  arranged  in  LATIN1  collating
  286.  sequence,  and  the  rows  and  columns  are  labeled with the first and second
  287.  digits, respectively, of the LATIN1 code points.  For example, LATIN1  code  41
  288.  (hex)  is  upper-case "A", and the intersection of row "4-" and column "-1" has
  289.  the value C1 (hex), which is the EBCDIC code for "A".  Rows "0-",  "1-",  "8-",
  290.  and  "9-" are officially undefined in ISO 8859-1 and so, in principle, could be
  291.  changed at some future time, especially "8-" and "9-".  Note  that  this  table
  292.  uses  a  format  close  to  that of the TDUMP subcommand and of the Kermit code
  293.  itself, but character-set tables are often displayed with the rows and  columns
  294.  interchanged.
  295. 0
  296.  -------------------------------------------------------------------------------
  297. 0      the front end itself).
  298. 0   3. If any ASCII character appears twice, there is no cause for alarm.
  299. 0   4. If any ASCII character does not appear where it should, according to
  300.        Table  1-3,  a SET TATOE must be added to the system INIT file.  For
  301.        example, if EBCDIC code 5F (Not Sign, according to the Appendix) ap-
  302.        pears  as an ASCII Tilde (7E), but EBCDIC A1 (Tilde) does not, a SET
  303.        TATOE 126 95 is required.  Warning: characters  considered  unprint-
  304.        able  by  the  front end are likely to be filtered out entirely when
  305.        you display the file; do not expect the display to line up just like
  306.        Table 1-3.
  307. 0   5. Create  a  file  on the mainframe using an ASCII terminal for input,
  308.        and enter all 95 printable ASCII characters in  collating  sequence.
  309.        You  can  presumably  save  time  by  skipping  the  52  upper-  and
  310. 11.1. Translation Tables                                                  Page 6
  311. 0-------------------------------------------------------------------------------
  312.        lower-case letters and the 10 digits.
  313. 0   6. Display the file from the previous step in hexadecimal or other  bi-
  314.        nary form.
  315. 0   7. If any duplicates appear among the 95 characters (or 33, if you have
  316.        taken the short cut), Kermit cannot work through this front end (un-
  317.        less you modify the tables in the front end).
  318. 0   8. Compare the hexadecimal codes with rows 2-7 of Table 1-2.  If a dis-
  319.        crepancy appears, a SET TETOA must be added to the system INIT file.
  320.        For  example, if ASCII Left Bracket (5B) appears as EBCDIC 4A, a SET
  321.        TETOA 74 91 is needed.  At this point, the first stage is complete.
  322. 0   9. If 8-bit line-mode file transfer is desired, you must now verify the
  323.        extended  character  set.    Display the file of EBCDIC codes again,
  324.        this time using a terminal with extended character set  display,  or
  325.        capture  the  session  with a micro Kermit and display the resulting
  326.        file in hexadecimal.  If any code in the range A0-FE  does  not  ap-
  327.        pear,  the  front  end  will  not allow 8-bit Kermit data transfers.
  328.        Generate SET TATOE entries for the entire range, as needed, just  as
  329.        in  the  example  given  for 7-bit codes.  If the front end's trans-
  330.        lation tables are documented, it may be  easier  to  work  from  the
  331.        manual,  but  you  must  be sure that you have tables for all of the
  332.        translations that occur on the data path.
  333. 0  10. Create a file of the 95 extended ASCII codes A0-FE, if possible,  by
  334.        using a terminal capable of transmitting those codes or transmitting
  335.        a pre-made file "raw".  If necessary, use the  appropriate  table(s)
  336.        in the manual(s) instead.
  337. 0  11. Again,  if  any  duplicates  appear,  this front end is incapable of
  338.        8-bit file transfers.  Otherwise, generate SET TETOA entries as  be-
  339.        fore.
  340. 0
  341.  1.2. File Attributes
  342. 0Kermit-370  attempts  to  send and receive file attributes along with the files
  343.  themselves.  Before Kermit receives a file, it compares  the  Length  attribute
  344.  (if  available)  with the amount of disk space available (if known) so that the
  345.  file can be rejected if it will not fit.  In addition, the Type, Access, Encod-
  346.  ing,  Disposition,  and  Format attributes, if any, are interpreted in order to
  347.  match the received file to the original as nearly as possible.  All  other  at-
  348.  tributes (including Date) are simply ignored.  For Type, Kermit recognizes text
  349.  and binary specifications; for Access, it recognizes append, normal, and super-
  350.  sede;  for Encoding, it recognizes ASCII, extended, and EBCDIC (which it treats
  351.  as binary); for Disposition, it recognizes mail, print, and job; and  for  For-
  352.  mat,  it  recognizes  text,  D-binary,  V-binary, binary, and LRECL.  Any other
  353.  values are rejected.
  354. 0On sending a file, if the other Kermit is willing to accept Attribute  packets,
  355.  Kermit-370  sends  the Type, Encoding, Format, Date, and Length attributes (un-
  356.  less some or all of them have been disabled -- see the  SET  ATTRIBUTE  subcom-
  357.  mand).
  358. 0Unfortunately, the set of file attributes defined in the Kermit protocol is not
  359. 11.2. File Attributes                                                     Page 7
  360. 0-------------------------------------------------------------------------------
  361.  -------------------------------------------------------------------------------
  362. 0
  363.         0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
  364. 0  4-                                    .  <  (  +  |
  365.    5-   &                             !  $  *  )  ;  ^
  366.    6-   -  /                             ,  %  _  >  ?
  367.    7-                              `  :  #  @  '  =  "
  368.    8-      a  b  c  d  e  f  g  h  i
  369.    9-      j  k  l  m  n  o  p  q  r
  370.    A-      ~  s  t  u  v  w  x  y  z           [
  371.    B-                                          ]
  372.    C-   {  A  B  C  D  E  F  G  H  I
  373.    D-   }  J  K  L  M  N  O  P  Q  R
  374.    E-   \     S  T  U  V  W  X  Y  Z
  375.    F-   0  1  2  3  4  5  6  7  8  9
  376. 0
  377.                  Table 1-3:  Character graphics for EBCDIC codes
  378. 0This  table  shows  the  representations of the EBCDIC codes arranged in EBCDIC
  379.  collating sequence, row by row.  Codes  that  do  not  correspond  to  ISO  646
  380.  characters (7-bit ASCII), have been left blank.  One special case is the EBCDIC
  381.  code 5F, which represents a Not Sign in IBM's CP037, but which is traditionally
  382.  mapped  to  the ASCII Circumflex, as shown here.  WARNING: this manual may have
  383.  been printed on a  device  that  maps  characters  differently.    Consult  the
  384.  Appendix to verify.
  385. 0
  386.  -------------------------------------------------------------------------------
  387. 0well matched to the needs of  IBM  370  file  systems,  so  that  much  of  the
  388.  machinery  for  creating and interpreting of Attribute packets is useless.  For
  389.  example, the "Format" attribute, which should logically specify the record for-
  390.  mat of the received file, gives only the format of the file in transmission and
  391.  cannot distinguish between fixed-length and  varying-length  records  for  text
  392.  files.    This  limitation  is partly due to the fact that other Kermits do not
  393.  generally support the same attributes.  In short, even if the protocol made  it
  394.  possible,  some  of  the  important attributes would never be specified anyway.
  395.  Nonetheless, efforts are being made to extend the  protocol  to  be  more  com-
  396.  prehensive.
  397. 0
  398.  1.3. Program Operation
  399. 0Kermit-370  can  be  invoked  directly  or from a command procedure.  In either
  400.  case, it reads and executes subcommands sequentially until  directed  to  quit,
  401.  and  then  returns.    A  subcommand  consists  of  one  or more fields (words)
  402.  separated by spaces or commas.
  403. 0Upon startup, the program looks for two (optional)  initialization  files,  one
  404.  system-wide  and a second specific to the user.  Both filespecs are, of course,
  405.  system-dependent.  The purpose of these files is to allow  Kermit  to  be  cus-
  406.  tomized  for  a  particular  system  and for a user's specific settings without
  407.  changing the source code.  The system-wide file, which is maintained by a  sys-
  408. 11.3. Program Operation                                                   Page 8
  409. 0-------------------------------------------------------------------------------
  410.  tems programmer, should contain Kermit subcommands that all users would need to
  411.  issue in order for Kermit to run on the system, such as subcommands  to  modify
  412.  the  ASCII/EBCDIC  tables  used by Kermit-370.  The user-specific file, if any,
  413.  should contain subcommands that the user generally issues every time Kermit  is
  414.  run.    Kermit-370 executes any subcommands found in these files as though they
  415.  were typed at the terminal.  Here is a sample INIT file:
  416. 0  * Asterisk in column one is a comment.
  417.    set transfer character-set latin1
  418.    set file collision rename
  419.    set block 3
  420. 0During interactive execution, you may  use  the  built-in  help  feature  while
  421.  typing Kermit-370 subcommands.  A question mark ("?") typed at almost any point
  422.  in a subcommand, followed by a carriage return, produces a brief description of
  423.  what  is  expected or possible at that point.  Moreover, mistyping a subcommand
  424.  will generally produce a helpful error message or a list of possible options at
  425.  the   point  of  error.    Keywords  in  such  lists  are  displayed  with  the
  426.  minimum-length abbreviation in upper case and the remainder, if any,  in  lower
  427.  case.  In entering Kermit subcommands, any keyword may be shortened to any sub-
  428.  string that contains the minimum abbreviation.
  429. 0Besides knowing the mechanics of entering Kermit subcommands  and  interpreting
  430.  responses,  the  user  must  understand  which  subcommands are necessary.  The
  431.  default values for Kermit-370 options have, in some cases, been constrained  by
  432.  a  desire  for  continuity,  so that some of the default behavior is distinctly
  433.  "suboptimal."  An example of this is the traditional  80-byte  default  RECEIVE
  434.  packet size, which generally gives much slower transmission than a size of 1000
  435.  or more.  Such options are flagged in this chapter with a  notation  that  they
  436.  perhaps  ought  to be set in the INIT files.  Note, however, that the interplay
  437.  of Kermit protocol sometimes provides a performance upgrade with no special ac-
  438.  tion  required  from  the  Kermit-370  user.    An  example of this is the SEND
  439.  packet-size, which is always under the control of the other Kermit.  Kermit-370
  440.  always  sends  packets as long as the other Kermit allows, unless the frequency
  441.  of transmission errors indicates that shorter packets would be  more  efficient
  442.  (see the subcommand SET SPEED).
  443. 0Kermit-370 also attempts to produce optimal results by adapting to the file at-
  444.  tributes sent by the other Kermit along with the files, such as TYPE and LRECL.
  445.  Such  attributes,  when sent by the other Kermit, temporarily override the cur-
  446.  rent settings in Kermit-370  during  the  reception  of  the  associated  file.
  447.  Potentially  even  more  importantly,  Kermit-370  automatically recognizes the
  448.  character set used for the file transfer and  chooses,  if  necessary,  a  com-
  449.  patible  character  set  for  file storage.  Table 1-1 shows the currently sup-
  450.  ported list of character sets.   As  with  any  automatic  operation,  Kermit's
  451.  honoring of the transmitted attributes may need to be suppressed in part or al-
  452.  together, and the SET ATTRIBUTE subcommand provides this capability.
  453. 0Another attribute that Kermit-370 supports is file  disposition,  which  allows
  454.  files  to be received and immediately retransmitted as electronic mail, sent to
  455.  a printer, or submitted as a  batch  job.    These  three  options  are  highly
  456.  site-specific  and are implemented as a set of three host commands with similar
  457.  calling sequences.  In each case, the command is invoked in two different  ways
  458.  in  the  process  of processing the file.  It is called without any filespec or
  459.  other  options  as  soon  as  the  corresponding  attribute  is  recognized  by
  460.  Kermit-370.    If  the  command is not implemented or for some reason returns a
  461. 11.3. Program Operation                                                   Page 9
  462. 0-------------------------------------------------------------------------------
  463.  non-zero completion code (such a code should be negative, if at all  possible),
  464.  Kermit-370  rejects  the  file  using  the normal attribute exchange mechanism.
  465.  Otherwise, the file is received as usual, and the command is invoked  again  at
  466.  the  end-of-file.    The  second  time,  the  command  is given the name of the
  467.  received file and the options received from the sending  Kermit  (such  as  the
  468.  list  of  recipients for electronic mail).  The command is then responsible for
  469.  disposing of the file (and deleting it, if desired).  If, for any  reason,  the
  470.  file  cannot  be sent as required, the command should return a negative comple-
  471.  tion code (or non-zero, at any rate), and Kermit-370 will send  back  an  error
  472.  message  to the sending Kermit.  The command itself should refrain from issuing
  473.  any messages of its own or permitting commands that it invokes  to  issue  mes-
  474.  sages.    See  the  beginning  of the chapter on the system-specific variant of
  475.  Kermit-370 for the exact command syntax.  Some sample implementations  of  such
  476.  commands  may  be  available  in  the  Kermit  distribution  --  refer  to  the
  477.  system-specific installation guide for a list of samples.
  478. 0
  479.  1.4. Kermit-370 Subcommands
  480. 0The following is a summary of Kermit subcommands.  The starred subcommands  can
  481.  be  issued  as  remote Kermit commands to Kermit-370 when it is in server mode.
  482.  System-specific subcommands are omitted from this list.
  483. 0          BYE      logs out other Kermit server.
  484.            CWD*     establishes a new working directory.
  485.      DIRECTORY      displays all or part of the disk directory.
  486.           ECHO      a line back to the user.
  487.           EXIT      from Kermit-370.
  488.         FINISH      other Kermit server.
  489.            GET      file(s) from a Kermit server.
  490.           GIVE*     creates a TAKE file snapshot of a table.
  491.           HELP      about Kermit-370.
  492.           HOST*     executes a system command.
  493.         KERMIT*     executes a Kermit subcommand.
  494.           QUIT      from Kermit-370.
  495.        RECEIVE      file(s) from other Kermit.
  496.           SEND      file(s) to other Kermit.
  497.         SERVER      mode of remote operation.
  498.            SET*     various parameters.
  499.           SHOW*     various parameters.
  500.          SPACE*     displays disk storage allocation.
  501.         STATUS*     inquiry.
  502.           STOP      easy escape from protocol mode.
  503.           TAKE*     subcommands from file.
  504.          TDUMP*     dumps the contents of a table.
  505.           TYPE*     a file.
  506.          XECHO      echoes a line (transparently).
  507.          XTYPE      displays a file (transparently).
  508. 0Although Kermit-370 is generally a remote Kermit, it has the capability of com-
  509.  municating  with  another  Kermit  in  server  mode.    In  that situation, the
  510.  subcommand prefixes REMOTE and LOCAL refer to the Kermit server and Kermit-370,
  511.  respectively,  even  when  Kermit-370 is, strictly speaking, the remote Kermit.
  512.  To help avoid confusion, this chapter will often  use  the  term  "foreign"  to
  513.  apply  to  the  Kermit at the other end from Kermit-370.  All the above subcom-
  514.  mands may be preceded by the LOCAL prefix, but only certain ones are valid with
  515. 11.4. Kermit-370 Subcommands                                             Page 10
  516. 0-------------------------------------------------------------------------------
  517.  REMOTE,  including some not shown here.  See the description of the SERVER sub-
  518.  command for details.  Any text replies Kermit-370 gets from the foreign  Kermit
  519.  server   are   added   to   a   disk   file  (whose  filespec  is,  of  course,
  520.  system-dependent).  Such a transaction can be carried out, for  example,  under
  521.  control  of  a  TAKE file if Kermit-370 is not operating locally.  If the local
  522.  Kermit has a "magic" character sequence that switches it from  terminal  emula-
  523.  tion  to  server  mode,  then  an  entire  session could be controlled from the
  524.  mainframe, possibly in response to a single command issued  by  a  naive  user.
  525.  For example,
  526. 0  .grab
  527. 0       Kermit-370 is invoked and executes the following TAKE file
  528. 0  ECHO Serve Me!        the local Kermit switches to server mode
  529.    GET file.a            the server uploads file.a
  530.    FINISH                the server switches back to terminal mode
  531. 0The remainder of this section describes subcommands with special meaning or use
  532.  in Kermit-370, except the highly system-dependent ones.  For the latter,  refer
  533.  to the appropriate chapter.  Subcommands are listed in alphabetical order.
  534. 0
  535.                          THE ECHO AND XECHO SUBCOMMANDS
  536. 0Syntax: [X]ECHO line
  537. 0These subcommands type the line back at the user.  The line may contain control
  538.  characters or any desired text, including upper or lower case.   These  subcom-
  539.  mands may be used, for example, to test the ASCII/EBCDIC translate tables or to
  540.  issue coded commands to the user's terminal.  XECHO differs from ECHO primarily
  541.  in  that  it sends the text as a raw transmission according to the current CON-
  542.  TROLLER setting.  Thus, XECHO will, if necessary, break the text into pieces no
  543.  larger  than the current SEND PACKET-SIZE and will use transparent mode if CON-
  544.  TROLLER is SERIES1, GRAPHICS  or  AEA.    It  also  offers  its  own  brand  of
  545.  control-character  quoting,  using  the "^" character to indicate that only the
  546.  five low-order bits of the ASCII codes are to be used.  Thus, "^a",  "^A",  and
  547.  "^!"  are  all  translated  to  SOH (CTRL-A), while "^[" becomes ESC.  However,
  548.  there must be one exception for "^" itself: "^>" and "^~" are  both  translated
  549.  to RS (CTRL-^), but "^^" becomes just "^".  XECHO also decodes 8th-bit quoting,
  550.  just as in Kermit protocol, and this feature can be disabled by setting 8th-bit
  551.  quoting  off.  For example, if the 8th-bit quote character is "&", entering the
  552.  subcommand "XECHO &A" will transmit a code x'C1', but the same subcommand  with
  553.  quoting off will transmit two bytes: x'2641'.
  554. 0
  555.                                THE GET SUBCOMMAND
  556. 0Syntax: GET [foreign-filespec [filespec]]
  557. 0The  GET subcommand tells Kermit to request a file or file group from the other
  558.  system, which must have a Kermit running in server mode.   Provided  the  other
  559.  Kermit  complies,  the  effect is the same as if SEND foreign-filespec had been
  560.  issued directly to the other Kermit and RECEIVE [filespec] to Kermit-370.    If
  561.  this  subcommand  is  issued  without any arguments, Kermit-370 will prompt the
  562.  user for both foreign and native filespecs (and  will  insist  on  getting  the
  563. 11.4. Kermit-370 Subcommands                                             Page 11
  564. 0-------------------------------------------------------------------------------
  565.  former,  but  will do without the latter).  See the respective SEND and RECEIVE
  566.  subcommands for a description of the each filespec.
  567. 0
  568.                                THE GIVE SUBCOMMAND
  569. 0Syntax: GIVE table-name filespec
  570. 0This compares the named translation table with its current default  values  and
  571.  saves  the differences in the form of a TAKE file consisting of SET subcommands
  572.  that would convert the default into  the  current  arrangement.    ATOE,  ETOA,
  573.  TATOE,  and  TETOA  are  the available tables.  The details of the filespec are
  574.  system-dependent, but those details will, in general, be the same  as  for  the
  575.  TAKE  subcommand  (q.v.).    In  the  case of tables ATOE and ETOA, the current
  576.  defaults are the values from the most recent character-set definition, if  any,
  577.  but  the defaults for TATOE and TETOA always remain at the initial values.  See
  578.  the SET FILE CHARACTER-SET and SET TRANSFER CHARACTER-SET subcommands for  more
  579.  details.
  580. 0
  581.                               THE HINTS SUBCOMMAND
  582. 0Syntax: HINTS
  583. 0This  subcommand  produces a screenful of suggestions for Kermit operation, in-
  584.  cluding warnings about any current settings that may be undesirable.
  585. 0
  586.                                THE HOST SUBCOMMAND
  587. 0Syntax: HOST text of command
  588. 0This issues a command to the host operating system from  Kermit-370.    When  a
  589.  command  returns  a  non-zero  completion  code,  the  code  will be displayed.
  590.  Generally, the name of the system (e.g., CMS) is treated as a synonym  for  the
  591.  HOST subcommand.
  592. 0When  Kermit-370  is  in (non-local) server mode, you must avoid sending it any
  593.  HOST commands that trigger full-screen terminal I/O,  since  the  server-client
  594.  interface   does  not  provide  any  full-screen  terminal  emulation,  nor  is
  595.  Kermit-370 usually able to intercept such I/O in any case.
  596. 0
  597.                               THE KERMIT SUBCOMMAND
  598. 0Syntax: KERMIT text of subcommand
  599. 0This is provided for redundancy as the  counterpart  of  the  HOST  subcommand.
  600.  Kermit-370  executes  the  specified text as a Kermit subcommand just as if the
  601.  LOCAL prefix had been entered.  Note, however, that the specified text must not
  602.  begin with a second KERMIT prefix.
  603. 11.4. Kermit-370 Subcommands                                             Page 12
  604. 0-------------------------------------------------------------------------------
  605.                              THE RECEIVE SUBCOMMAND
  606. 0Syntax: RECEIVE [filespec]
  607. 0The  RECEIVE  subcommand  tells Kermit-370 to accept a file or file group.  The
  608.  user must issue the corresponding SEND subcommand to the other  Kermit.    When
  609.  files are received, their names are recorded in a transaction log in memory and
  610.  may be viewed later via the TDUMP NAMES subcommand.  The log contains the names
  611.  along with the file sizes and any relevant error messages.  Another form of log
  612.  may be provided through an accounting exit routine, which is called at the  end
  613.  of  every RECEIVE session.  Such an accounting log may contain elapsed time and
  614.  numbers of bytes sent, received, and transferred to/from disk.  If an error oc-
  615.  curs  during the file transfer, as much of the file as was received is saved on
  616.  disk.  If, however, the sending of a file is  cancelled  by  the  user  of  the
  617.  foreign  system, Kermit-370 will discard whatever had arrived, unless FILE COL-
  618.  LISION is APPEND or INCOMPLETE is KEEP.
  619. 0Kermit-370 has a context-dependent maximum record length, and received  records
  620.  longer  than  that  will be folded or truncated to the proper length; when this
  621.  happens, Kermit may or  may  not  stop,  depending  on  the  FILE  subparameter
  622.  LONGLINE.   If truncation does occur, Kermit will later note the fact as an er-
  623.  ror (unless something more serious happens in the meantime).  In addition, when
  624.  a  fixed record length is specified, received records are padded to the correct
  625.  length.  The padding character is a blank for text files and a null for  binary
  626.  files.    Received  binary  (but not V-binary or D-binary) files are treated as
  627.  byte streams and broken up into records all of the logical record length, i.e.,
  628.  folded.    For more details on the RECEIVE subcommand syntax and operation, see
  629.  the chapter on the desired system-specific variant  of  Kermit-370  under  both
  630.  RECEIVE and SET FILE.  See also (in this chapter) the SET FILE LONGLINE subcom-
  631.  mand for details on record truncation and folding.
  632. 0
  633.                                THE SEND SUBCOMMAND
  634. 0Syntax: SEND [filespec[<options>] [foreign-filespec]][, ...]
  635. 0The SEND subcommand tells Kermit-370 to send a file or file group to the  other
  636.  (foreign)  Kermit.  If no such file exists, Kermit-370 simply displays an error
  637.  message and issues another prompt.  Like RECEIVE, SEND keeps a transaction  log
  638.  of  all  files  transferred in a group and calls the accounting exit routine at
  639.  the end of the session.  If this subcommand is issued  without  any  arguments,
  640.  Kermit-370 will prompt the user for both native and foreign filespecs (and will
  641.  insist on getting the former, but will do without the latter).  Either with  or
  642.  without  prompting,  SEND  allows  specifying a list of up to 13 files (or file
  643.  groups) separated by commas.    (By  ending  the  command  line  or  subsequent
  644.  response  with  a  comma, the user ensures further prompting.)  In this syntax,
  645.  the options enclosed in angle brackets may be regarded as part  of  the  native
  646.  filespec.  There must be no intervening blanks.  At present, the only supported
  647.  option is a range of line numbers within the file to be sent.  The range  takes
  648.  the  form  [n][-[m]], where n is the number of the first line to send (counting
  649.  from 1), and m is the last.  Omitting either number implies  the  corresponding
  650.  limit  is  the  physical beginning or end of the file.  This same option syntax
  651.  may be used in some commands issued to the foreign Kermit,  namely,  those  in-
  652.  volving filespecs in 370 form.  In particular, GET and REMOTE TYPE can use this
  653.  syntax.  Note that a trailing ">" is  used  by  some  other  Kermits,  such  as
  654.  MS-Kermit,  to indicate redirection of the output from REMOTE commands to disk.
  655. 11.4. Kermit-370 Subcommands                                             Page 13
  656. 0-------------------------------------------------------------------------------
  657.  In order to transmit the ">" and also prevent the redirection to disk, it would
  658.  be necessary to add an explicit redirection to the terminal, as in
  659. 0  REM TYPE filespec<n-m> > CON
  660. 0Although  file  transfers  cannot be cancelled from the 370 side, Kermit-370 is
  661.  capable of responding to "cancel file" or "cancel batch" signals from the local
  662.  Kermit; these are typically entered by typing CTRL-X or CTRL-Z, respectively.
  663. 0When Kermit-370 sends files using long packets (longer than 94), the throughput
  664.  is especially sensitive to the level of noise on the line because  retries  are
  665.  so  time-consuming.    Therefore,  Kermit-370  imposes an extra, heuristic size
  666.  limit on packets when retries have been found necessary.    When  that  is  the
  667.  case,  after  every  15  packets,  Kermit  computes the packet size for maximum
  668.  throughput  assuming  that  the  transmission  errors  were  due   to   sparse,
  669.  Poisson-distributed  noise bursts.  The result of this calculation is then used
  670.  as another limit on the size of outgoing packets besides the one  specified  by
  671.  the other Kermit.  If no retries are required, then Kermit-370 assumes the line
  672.  to be noiseless and sends packets of the maximum length the  other  Kermit  al-
  673.  lows.   The algorithm is explained in Kermit News V. 3 #1.  For more details on
  674.  the SEND subcommand syntax and  operation,  see  the  chapter  on  the  desired
  675.  system-specific variant of Kermit-370.
  676. 0
  677.                               THE SERVER SUBCOMMAND
  678. 0Kermit-370  is  capable  of acting as a server.  In server mode, Kermit-370 can
  679.  send and receive files, execute host commands, execute a restricted set of Ker-
  680.  mit  subcommands,  and perform a variety of generic Kermit functions.  The fol-
  681.  lowing list shows the typical local Kermit commands along with the server func-
  682.  tions  they  elicit.    When Kermit-370 is talking to another Kermit running in
  683.  server mode, these same subcommands may be used in the other direction.
  684. 0BYE                 log out the Kermit server.
  685.  FINISH              server mode.
  686.  GET                 a file or files from the server.
  687.  REMOTE
  688.    COPY              a file or files.
  689.    CWD               set new working directory.
  690.    DELETE            a file or files.
  691.    DIRECTORY         display file attributes.
  692.    HELP              display a command summary, such as this.
  693.    HOST              execute a system command.
  694.    KERMIT            execute a Kermit-370 subcommand.
  695.    PRINT             send a file to be printed by the server.
  696.    RENAME            a file or files.
  697.    SPACE             display disk space.
  698.    TYPE              a file.
  699.  SEND                a file or files to the server.
  700. 0If your local Kermit does not support the REMOTE KERMIT command, you  may  need
  701.  to  issue  SET  subcommands  to select various options before typing the SERVER
  702.  subcommand.  Once in server mode, Kermit-370 will await  all  further  instruc-
  703.  tions  from the client Kermit on the other end of the connection until a FINISH
  704.  or BYE command is given.
  705. 0Command execution in server mode is different  in  some  respects  from  normal
  706. 11.4. Kermit-370 Subcommands                                             Page 14
  707. 0-------------------------------------------------------------------------------
  708.  operation.  First of all, some Kermit subcommands are not allowed (see the list
  709.  at the beginning of this section).  Moreover, command errors  always  terminate
  710.  any  active  TAKE file.  Also, all commands will be run in the special environ-
  711.  ment that Kermit sets up during protocol transfers.  Among other things, Kermit
  712.  intercepts  all  terminal  I/O  (if  possible)  in this environment in order to
  713.  transmit the data to the local Kermit as text packets.
  714. 0Note that some operations can be requested by several different commands.    If
  715.  for  example,  the  IBM 370 system has a command "PRT" for displaying a file, a
  716.  user interacting with a Kermit-370 server can choose to display a file  by  is-
  717.  suing  any  of  the commands: REMOTE TYPE, REMOTE HOST PRT, REMOTE KERMIT TYPE,
  718.  REMOTE KERMIT HOST PRT, or (if SYSCMD has been set ON) REMOTE KERMIT PRT.   The
  719.  first  form  simply transfers the requested file as text, but the others invoke
  720.  the "PRT" command with any specified options, intercept  the  terminal  output,
  721.  and  return  the  results  to the local Kermit.  The first form is also distin-
  722.  guished by the fact that the line range may be specified in the same manner  as
  723.  in the SEND subcommand.  The syntax of the others is system-dependent.
  724. 0
  725.                                THE SET SUBCOMMAND
  726. 0Syntax: SET parameter [value]
  727. 0The  SET subcommand establishes or modifies various parameters controlling file
  728.  transfers.  The values can, in turn, be  examined  with  the  SHOW  subcommand.
  729.  Some  parameters  have two levels.  In particular, there are two matching lists
  730.  of SEND and RECEIVE sub-parameters corresponding to  the  values  exchanged  by
  731.  Kermits  in  the  Send-Init/ACK sequence.  For each of these SEND/RECEIVE pairs
  732.  one element is encoded in outgoing parameter packets, and the other is  decoded
  733.  from incoming ones.  Setting the latter by hand may be needed to establish con-
  734.  tact and also has the effect of redefining the default value for decoding  from
  735.  subsequent  parameter  packets.    Generally,  the distinction between SEND and
  736.  RECEIVE parameters is unambiguous, the only  exception  being  TIMEOUT  (q.v.).
  737.  The following SET subcommands are available in Kermit-370:
  738. 0ATOE                Modify the Kermit-370 ASCII-to-EBCDIC table.
  739.  ATTRIBUTE           Determine A-packet generation.
  740.  BLOCK-CHECK         Level of error checking for file transfer.
  741.  CONTROLLER          Indicate type of terminal connection.
  742.  DEBUG               Log packet traffic during file transfer.
  743.  DELAY               Length of pause before a SEND subcommand.
  744.  EOF                 Text file truncation at CTRL-Z.
  745.  ETOA                Modify the Kermit-370 EBCDIC-to-ASCII table.
  746.  FILE                Attributes for incoming or outgoing files...
  747.    CHARACTER-SET     ... for 370 storage.
  748.    COLLISION         ... treatment for duplicate names.
  749.    LONGLINE          ... treatment of too-long records.
  750.    OVERWRITE         ... treatment of attributes.
  751.    TYPE              ... text or binary.
  752.    other             ... system-specific attributes.
  753.  FOREIGN             Strings added to outgoing filespec...
  754.    PREFIX
  755.    SUFFIX
  756.  INCOMPLETE          Determine the action on an aborted file transfer.
  757.  LINE                Specify alternate communication line.
  758.  MARGIN              for sending files...
  759. 11.4. Kermit-370 Subcommands                                             Page 15
  760. 0-------------------------------------------------------------------------------
  761.    LEFT
  762.    RIGHT
  763.  PROMPT              For Kermit-370 subcommands.
  764.  RETRY               Maximum retry count...
  765.    INIT              ... for initial packet exchange.
  766.    PACKET            ... per packet for ongoing transfer.
  767.  SERVER-TIMEOUT      Spacing between server NAK's.
  768.  SPEED               Line speed for packet-size calculations.
  769.  SYSCMD              Try apparently invalid Kermit subcommands on host system.
  770.  TABS-EXPAND         Determine tab-to-space conversion on reception.
  771.  TAKE
  772.    ECHO              Echo subcommands read from TAKE files.
  773.    ERROR-ACTION      Exit from TAKE file on command error.
  774.  TEST                Facilitate testing of Kermit.
  775.  TATOE               Modify the Kermit-370 ASCII-to-EBCDIC table.
  776.  TETOA               Modify the Kermit-370 EBCDIC-to-ASCII table.
  777.  TRANSFER            Options...
  778.    CHARACTER-SET     ... for transmission.
  779.  TTABLE              Determine which tables undo the terminal translation.
  780.  8-BIT-QUOTE         Determine state of 8th-bit prefixing.
  781.  SEND or RECEIVE
  782.    END-OF-LINE       Packet terminator.
  783.    PACKET-SIZE       Maximum packet size.
  784.    PAD-CHAR          Character to insert before each packet.
  785.    PADDING           Number of pad characters to insert.
  786.    PARITY            Indicate if 7-bit or 8-bit data.
  787.    QUOTE             Use to quote control characters in packets.
  788.    START-OF-PACKET   Packet beginning marker.
  789.    TIMEOUT           Time limit for response.
  790. 0
  791.  SET ATOE etc.
  792. 0Syntax: SET table [num1 num2]
  793. 0This  modifies  one  of  the ASCII/EBCDIC translation tables used by Kermit-370
  794.  (for example, to conform to your system).  The  valid  table  names  are  ATOE,
  795.  ETOA, TATOE, and TETOA.  The arguments are, respectively, the offset within the
  796.  named table and the new value for that offset.  If the arguments  are  omitted,
  797.  the table is restored to its initial arrangement.  Both num1 and num2 should be
  798.  in the range 0-255 (decimal).  For example, in ATOE or TATOE, the offset is the
  799.  ASCII  character  code,  and  the new value is the new EBCDIC result code.  In-
  800.  itially, ATOE and TATOE each contain two identical copies of  the  7-bit  ASCII
  801.  character  table.    Helpful  hint: if you have files that make use of extended
  802.  (8-bit) ASCII codes and wish to upload them via Kermit-370, be sure  to  define
  803.  unique  EBCDIC  equivalents  of  all the needed 8-bit ASCII codes or else treat
  804.  such files as binary data.  Any time you use the SET ATOE or SET  ETOA  subcom-
  805.  mands,  that has a side effect equivalent to SET ATTRIBUTE ENCODING OFF (q.v.).
  806.  If the extended ASCII character set is one of those supported for file transfer
  807.  in Kermit-370, you need only issue a SET TRANSFER CHARACTER-SET (q.v.).
  808. 0Note:  the  meaning of the tables depends on the TTABLE setting -- if TTABLE is
  809.  OFF, the TATOE and TETOA tables are not used.
  810. 11.4. Kermit-370 Subcommands                                             Page 16
  811. 0-------------------------------------------------------------------------------
  812.  SET ATTRIBUTE
  813. 0Syntax: SET ATTRIBUTE [attribute] ON or OFF
  814. 0The individual attributes are  LENGTH,  TYPE,  DATE,  CREATOR,  ACCOUNT,  AREA,
  815.  PASSWORD,  BLOCKSIZE,  ACCESS,  ENCODING, DISPOSITION, PROTECT, ORIGIN, FORMAT,
  816.  SYS-INFO, and BYTE-LENGTH.  Kermit-370 distinguishes between the two  forms  of
  817.  this subcommand by counting "words".  In order to see the list of supported at-
  818.  tributes, you must enter "SET ATTR ? ?"; if you enter just "SET ATTR ?", Kermit
  819.  will list just the alternatives ON and OFF.
  820. 0ON      The  specified  attribute  is to be processed, or attribute packets are
  821.          generated for all outgoing files, provided the other  Kermit  indicates
  822.          the ability to accept them.  (Default).
  823. 0OFF     The  specified  attribute  is  to  be ignored and not generated, or at-
  824.          tribute packets are never generated.
  825. 0
  826.  SET BLOCK-CHECK
  827. 0Syntax: SET BLOCK-CHECK number
  828. 0This determines the type of block check used during file transfer, provided the
  829.  other  Kermit  agrees.    Valid  options for number are: 1 (for a one-character
  830.  checksum), 2 (for a two-character checksum) and 3 (for a three-character  CRC).
  831.  This  is one of only two Send-Init parameters that cannot be SET separately for
  832.  SEND and RECEIVE.
  833. 0
  834.  SET CONTROLLER
  835. 0Syntax: SET CONTROLLER type
  836. 0The type may be TTY, SERIES1, GRAPHICS,  AEA,  FULLSCREEN,  VTAMTTY,  or  NONE.
  837.  Kermit-370  automatically  determines  whether you are connected via a Series/1
  838.  (or similar) emulation controller or a TTY line.  In some  circumstances,  such
  839.  as when the connection is through a non-graphics-capable 3174 port, Kermit will
  840.  set CONTROLLER to NONE, which has the effect of disabling file transfers.  This
  841.  subcommand is provided, though, to allow the automatic choice to be superseded,
  842.  and because Kermit may not be able to  distinguish  between  Series/1-type  and
  843.  other  3270-emulation  controllers.   In particular, there is no way to distin-
  844.  guish between FULLSCREEN and GRAPHICS from within Kermit.  When  CONTROLLER  is
  845.  set  to SERIES1, GRAPHICS, or AEA, Kermit disables the 3270 protocol conversion
  846.  function by putting the terminal controller into "transparent mode", which  al-
  847.  lows Kermit packets to pass through intact.  Note: an incorrect CONTROLLER set-
  848.  ting may lock up or wipe out your session when you try to transfer files.
  849. 0Kermit operation is possible through an IBM 3708  front  end,  but  only  in  a
  850.  rather  specific configuration.  See the installation guide for your variant of
  851.  Kermit-370 for the details of that and other hardware-related restrictions  and
  852.  configurations.
  853. 11.4. Kermit-370 Subcommands                                             Page 17
  854. 0-------------------------------------------------------------------------------
  855.  SET DEBUG
  856. 0Syntax: SET DEBUG OFF or ON [RAW] [I/O] [SAVE] [LONG]
  857. 0Note:  any  combination,  in  any  order,  of  RAW, I/O, and SAVE may follow or
  858.  replace ON.  Each of the three implies ON.
  859. 0ON      Keep a journal of all packets sent and received in a log file on  disk.
  860.          If the file already exists, it is erased and overwritten.  The filespec
  861.          of the log is, of course, system-dependent.  All packets are logged  in
  862.          EBCDIC  for  legibility,  even  when  CONTROLLER  is  set  to  SERIES1,
  863.          GRAPHICS, or AEA.
  864. 0RAW     The same as ON, but packets are logged in the form that is passed to or
  865.          from  the  operating system, i.e., EBCDIC for TTY or VTAMTTY terminals,
  866.          and ASCII for SERIES1, GRAPHICS, and AEA terminals.
  867. 0I/O     The same as ON, but the log includes additional transmission status in-
  868.          formation, such as the AID returned by a full-screen device.  See below
  869.          for a summary of the log formats.
  870. 0SAVE    The same as ON, but the log file is closed after each entry  is  added,
  871.          so  that, if the session is abnormally terminated, the log file will be
  872.          complete and readable.
  873. 0LONG    The same as I/O, but the additional information is not truncated to  36
  874.          bytes.
  875. 0OFF     Stop logging packets and close the the log file.  (Default.)
  876. 0Often,  problems  with  Kermit  file transfers or server-mode operations can be
  877.  diagnosed by setting DEBUG on in one or both Kermits, regardless of  where  the
  878.  problems  actually  lie.  For Kermit-370, the maximum amount of information can
  879.  generally be obtained by setting DEBUG to I/O or LONG, but the  format  of  the
  880.  log  depends  somewhat  on which variant of Kermit-370 is involved.  Before ex-
  881.  amining the log, you should set DEBUG OFF either explicitly or by exiting  from
  882.  Kermit-370.
  883. 0There  is  an  optional feature for logging dumps of storage blocks at selected
  884.  points in the execution.  By default, this feature  is  disabled  (at  assembly
  885.  time) by having the variable symbol &KTRACE set to NO and also by virtue of the
  886.  fact that no calls to the dump routine are present in  the  distribution  code.
  887.  Further, the dumps are suppressed unless both DEBUG and TEST (q.v.) are set on.
  888.  To select when and what blocks to dump, it is  necessary  to  insert  calls  to
  889.  KHDMP  at  appropriate  points in the source before assembling.  Each such call
  890.  generates a dump each time it is executed, provided that  DEBUG  and  TEST  are
  891.  set,  and  the contents of all registers are preserved.  The call specifies the
  892.  starting address, the length, and a short title for  the  block.    Only  eight
  893.  characters of the title will be used.  Some examples:
  894. 0            KHDMP ATOE+128,128,'ATOEhigh'
  895.                            Dump the 2nd half of the ATOE table.
  896. 0            KHDMP KHDSAV,20,'R14 - R2'
  897.                            Dump registers 14-2.
  898. 0            KHDMP 32(,13),40,'**R3-R12'
  899. 11.4. Kermit-370 Subcommands                                             Page 18
  900. 0-------------------------------------------------------------------------------
  901.                            Dump registers 3-12.
  902. 0            KHDMP (3),(0),'**QBLOCK'
  903.                            Dump  block  addressed by R3 with length specified in
  904.                            R0.
  905. 0There is another debugging facility that is  enabled  by  the  variable  symbol
  906.  &KTRACE  along  with  the  dump option, namely, an execution trace.  There is a
  907.  circular buffer of trace elements in Kermit's working storage, and a  new  ele-
  908.  ment  is  written each time a Kermit subroutine is called or returns.  The ele-
  909.  ments contain the subroutine name plus (on entry) a  sequence  number  and  the
  910.  contents  of  registers 0 and 1 or (on exit) the character ">" and the contents
  911.  of registers 15 and 1.  There is also a mechanism for tracing extra  events  by
  912.  inserting KTRACE calls into the source.  For example,
  913. 0            KTRACE 0(5),REGS=5
  914.                            Trace eight bytes pointed to by R5 and R5 itself.
  915. 0            KTRACE FOOBAR Trace eight bytes at label FOOBAR.
  916. 0            KTRACE 'Found it',REGS=(1,7)
  917.                            Trace 'Found it', R1, and R7.
  918. 0The  trace  table is simply updated in storage, eating its own tail.  It can be
  919.  found in a memory dump by locating the "eye-catcher" that says "KTRACE:", which
  920.  precedes the start, current, and end pointers for the table.  Usually, there is
  921.  no access to the table except in ABEND dumps and the like.   It  would  not  be
  922.  very  useful  to have a KHDMP call for the table, since each line dumped to the
  923.  debug log would cause at least four other lines in the table to be  overwritten
  924.  by the ongoing trace, thereby losing most of the desired information.
  925. 0Each  line  in  the debug log begins with a one-letter tag and a colon and con-
  926.  tains information according to the tag.  The following tags are defined.
  927. 0S:  The text of a packet sent.  Normally, it will be encoded in EBCDIC for con-
  928.      venience,  but  if  DEBUG  is set to RAW, the packet will appear exactly as
  929.      passed to or from the system, i.e., in EBCDIC for TTY or VTAMTTY lines  and
  930.      in ASCII for full-screen lines.
  931. 0R:  The text of a packet received.  The same encoding applies.
  932. 0A:  The  AID  and  buffer address returned by a full-screen device along with a
  933.      read operation (three characters in all).  The values should all be  print-
  934.      able  EBCDIC.   This obsolete tag was used by TSO and MUSIC Kermits and ap-
  935.      peared only when DEBUG was set to I/O.
  936. 0*:  Data dumped by the optional KHDMP routine.
  937. 0The following tags appear only when DEBUG is set to I/O or LONG.    All  values
  938.  are  in  hexadecimal.   The meanings differ slightly according to the operating
  939.  system.  For CMS, the I/O parameter list is a channel command; for TSO or  ROS-
  940.  COE,  the  SVC  93  (TPUT/TGET)  parameters;  for  CICS, an intermediate string
  941.  similar to channel commands.  Similarly, the status data consist of the  stored
  942.  CSW plus an attention interrupt indicator for CMS, but the return code from the
  943.  I/O operation for TSO, ROSCOE, CICS, and MUSIC.
  944. 11.4. Kermit-370 Subcommands                                             Page 19
  945. 0-------------------------------------------------------------------------------
  946.  a:  Channel and device status after an unexpected attention interrupt.
  947. 0b:  I/O parameter list for recovering from a CP break-in on screen.
  948. 0c:  I/O parameter list for resuming normal screen operation.
  949. 0d:  Data transferred on the previously indicated I/O operation.
  950. 0e:  Status data after an I/O command has completed with an error.
  951. 0g:  I/O parameter list for reading from the screen buffer.
  952. 0i:  Status data after an I/O command has completed normally.
  953. 0m:  I/O parameter list for displaying text on the screen.
  954. 0o:  I/O parameter list for initializing the screen for transfers.
  955. 0r:  I/O parameter list for reading from the terminal.
  956. 0w:  I/O parameter list for a transparent write.
  957. 0?:  I/O parameter list for some other operation, such as clearing the screen.
  958. 0
  959.  SET DELAY
  960. 0Syntax: SET DELAY number
  961. 0Normally, Kermit-370 waits 10 seconds after the SEND subcommand before starting
  962.  the  transfer,  but this delay may be set to any non-negative value.  Two DELAY
  963.  values have special meaning.  When DELAY is 1, the usual two-line greeting dis-
  964.  played during protocol mode is abbreviated to a short message (the default Ker-
  965.  mit prompt with three dots...), and when DELAY is 0, the greeting is suppressed
  966.  entirely,  along  with the extra one-second pause for subcommands like RECEIVE,
  967.  SERVER, REMOTE, and the like.
  968. 0
  969.  SET EOF
  970. 0Syntax: SET EOF ON or OFF
  971. 0ON      Scan each incoming TEXT file for the first occurrence of CTRL-Z and ig-
  972.          nore  the remainder of the file (but continue decoding up to the actual
  973.          end of the file).  BINARY files are not affected.
  974. 0OFF     Accept incoming files in their entirety.  (Default.)
  975. 0
  976.  SET FILE CHARACTER-SET
  977. 0Syntax: SET FILE CHARACTER-SET name
  978. 0Specifies the name of the character set used in files stored  on  disk.    This
  979.  setting  may  be  superseded  by an Attribute packet of an incoming file.  Cur-
  980.  rently, the available names are  CP037,  CP273,  CP275,  CP277,  CP278,  CP280,
  981. 11.4. Kermit-370 Subcommands                                             Page 20
  982. 0-------------------------------------------------------------------------------
  983.  CP281,  CP282,  CP284,  CP285, CP290, CP297, CP424, CP500, CP838, CP870, CP871,
  984.  CP875,  CP880,  CP905,  CZECH,  DKOI,  EBCDIC,  H-EBCDIK-DASH,  and  KANJI  (or
  985.  FUJITSU-KANJI, HITACHI-KANJI, or IBM-KANJI).  The names beginning with CP refer
  986.  to IBM code pages, while DKOI is the Cyrillic standard GOST  19768-87  used  in
  987.  the USSR, CZECH is a character set sometimes used in Czechoslovakia, and EBCDIC
  988.  (the default) is the traditional de facto standard EBCDIC  character  set.    A
  989.  character  set other than the default may be required by local conventions and,
  990.  if so, should be specified in the system or user INIT files.  See Table 1-1 for
  991.  the  allowed combinations of transfer and file character sets.  Explicitly set-
  992.  ting this option has a side effect equivalent to issuing SET ATTRIBUTE ENCODING
  993.  ON (q.v.).
  994. 0The  name  KANJI  is actually just an alias for the local preferred proprietary
  995.  Kanji code (Fujitsu, Hitachi, or IBM).  The various Kanji character  sets  have
  996.  two-byte  codes  (DBCS),  but are used with one-byte code pages (SBCS) as well.
  997.  It is normally necessary to issue two SET FILE CHARACTER-SET SUBCOMMANDS in or-
  998.  der  to  set  up  for  a DBCS: first, selecting a compatible SBCS, and, second,
  999.  selecting the DBCS itself.  If  the  current  SBCS  is  incompatible  with  the
  1000.  selected  DBCS,  a default will be chosen.  This default, along with the choice
  1001.  of the particular proprietary character set associated with the alias KANJI, is
  1002.  chosen by the installer.
  1003. 0
  1004.  SET FILE COLLISION
  1005. 0Syntax: SET FILE COLLISION action
  1006. 0Specifies  the action to take when an incoming file has the same name as an ex-
  1007.  isting one.  Two of the options involve choosing an  alternative,  unique  name
  1008.  similar   to   the   one   in   conflict,  but  the  details  of  choosing  are
  1009.  system-specific.  Typically, the method involves adding digits to the  existing
  1010.  name.
  1011. 0APPEND       The  new file is appended to the old one.  This option has the the
  1012.               same effect as the old subcommand SET APPEND ON.
  1013. 0BACKUP       The existing file is renamed,  and  the  new  file  is  given  the
  1014.               desired name as if no conflict had occurred.
  1015. 0DISCARD      The incoming file is rejected by returning a "cancel file" indica-
  1016.               tion on any Data packets.
  1017. 0OVERWRITE    The existing file is overwritten with the incoming file.  This  is
  1018.               the  default for the CMS, TSO, ROSCOE, and MUSIC variants.  Chang-
  1019.               ing this default is a good candidate for INIT files.    When  COL-
  1020.               LISION  is  set  to  OVERWRITE, the attributes of the new file are
  1021.               determined by the current setting of FILE OVERWRITE (q.v.).
  1022. 0RENAME       The incoming file is renamed so as not to destroy (overwrite)  the
  1023.               pre-existing one, and the new name is returned to the sending Ker-
  1024.               mit for information purposes.  This has the same effect as the old
  1025.               subcommand  SET  WARNING  ON.    This  is the default for the CICS
  1026.               variant.
  1027. 11.4. Kermit-370 Subcommands                                             Page 21
  1028. 0-------------------------------------------------------------------------------
  1029.  SET FILE LONGLINE
  1030. 0Syntax: SET FILE LONGLINE FOLD or TRUNCATE or HALT
  1031. 0This specifies the action to take when a received line is longer than the  cur-
  1032.  rent  maximum  record  length.    That length is determined by the context in a
  1033.  system-specific way.  Refer to the description of the RECEIVE subcommand in the
  1034.  appropriate chapter for details.
  1035. 0FOLD       Specifies  that  long lines are to be split into two or more records
  1036.             as needed, all but the last being of the maximum length.    No  null
  1037.             records  are  created when the received line is an exact multiple of
  1038.             the record length.  BINARY files are,  by  definition,  always  con-
  1039.             sidered  as a single line and, therefore, are always folded, regard-
  1040.             less of the setting of this parameter.  V-BINARY and D-BINARY files,
  1041.             on the other hand, are reconstructed by folding at points determined
  1042.             by the context within the received file, and cannot be  folded  fur-
  1043.             ther  to  fit the current maximum length.  Any such records that are
  1044.             too long will be truncated.
  1045. 0TRUNCATE   Specifies that long lines are to be truncated at the maximum length.
  1046.             (Default.)   Kermit-370 takes note of the number of such truncations
  1047.             performed on a file and reports it in the STATUS  message  and  also
  1048.             treats  the fact of truncation as an error when the file transfer is
  1049.             complete.  The file will have been transferred,  but  obviously  not
  1050.             quite  intact.    However, this option can be useful for some tasks,
  1051.             such as stripping sequence numbers from card images.  The process is
  1052.             similar  to  that  provided  by  the SET MARGIN RIGHT subcommand for
  1053.             sending files.
  1054. 0HALT       Specifies that a file transfer is to halt immediately if a  received
  1055.             line  is too long.  Kermit-370 then issues an error packet and stops
  1056.             the transfer.
  1057. 0
  1058.  SET FILE OVERWRITE
  1059. 0Syntax: SET FILE OVERWRITE DEFAULT or PRESERVE
  1060. 0DEFAULT    Specifies that the current file attribute settings are  to  be  used
  1061.             for  the  new  file.    The result is roughly the same as if the old
  1062.             file, if  any,  were  completely  erased  before  the  new  file  is
  1063.             received.  (Default.)
  1064. 0PRESERVE   Specifies  that  the attributes of the file being overwritten are to
  1065.             be retained and used for the new file.  The result  is  roughly  the
  1066.             same  as  if  the  old files contents were deleted, and the new file
  1067.             were appended to the empty stub.
  1068. 0
  1069.  SET FILE TYPE
  1070. 0Syntax: SET FILE TYPE type
  1071. 0Specifies the type of data comprising files to be sent or received.  This  set-
  1072.  ting  may  be  temporarily superseded by the Attribute packets for a file being
  1073. 11.4. Kermit-370 Subcommands                                             Page 22
  1074. 0-------------------------------------------------------------------------------
  1075.  received.
  1076. 0TEXT       Specifies ordinary text.  ASCII-to-EBCDIC or EBCDIC-to-ASCII  trans-
  1077.             lation  is  performed on the data.  Trailing blanks are removed, and
  1078.             CRLF's are appended to outgoing records. CRLF's are used,  in  turn,
  1079.             to  determine  the  end  of  incoming records, which are padded with
  1080.             blanks if necessary to fill buffers.   (Default.)    Note:  trailing
  1081.             blanks  are  removed  from  outgoing, varying-length records only if
  1082.             they consist of a single blank each, or if there is a  right  margin
  1083.             specified  (q.v.).    Further  note:  a  given file is intrinsically
  1084.             categorized as fixed-length or varying-length (or  undefined-length)
  1085.             by  the file system and cannot be changed simply by setting the FILE
  1086.             RECFM  parameter  in  Kermit.    Conversion  between  formats  is  a
  1087.             system-specific  function;  see  the system documentation or consult
  1088.             your local support staff for details on conversion techniques.
  1089. 0BINARY     Specifies bit-stream data.  No translation is performed,  no  CRLF's
  1090.             are  added  to  outgoing  records,  and blanks are neither added nor
  1091.             removed.  Incoming bytes  are  added  successively  to  the  current
  1092.             record  buffer,  which  is  written  out  when  the current LRECL is
  1093.             reached.  Padding, if necessary, is done with nulls.
  1094. 0V-BINARY   Specifies varying-length-record binary data.  This type is like  BI-
  1095.             NARY, except that a two-byte binary prefix is added to each outgoing
  1096.             record giving the number of data bytes, and incoming records are set
  1097.             off by (and stripped of) their prefixes on receipt.
  1098. 0D-BINARY   Is  like  V-BINARY  except  that  the  length prefixes are five-byte
  1099.             ASCII-encoded decimal (right-justified with leading zeroes).
  1100. 0
  1101.  SET FOREIGN
  1102. 0Syntax: SET FOREIGN PREFIX string
  1103. 0This defines a prefix string to be added to the outgoing filespec generated  by
  1104.  the  SEND  subcommand.  For example, the string might be set to "B:" to specify
  1105.  output to the B disk drive on the other Kermit's system.  The default is a null
  1106.  string.  There is also a FOREIGN SUFFIX handled in the same manner.
  1107. 0
  1108.  SET HANDSHAKE
  1109. 0Syntax: SET HANDSHAKE number
  1110. 0This defines the character, if any, that Kermit-370 should send (or cause to be
  1111.  sent) immediately before reading each packet.  The character is  given  as  the
  1112.  decimal  of  an  ASCII  control  character, or as zero if no handshake is to be
  1113.  sent.  The default is 17 (XON), and any value in the range 0-31 is  valid,  but
  1114.  13 (CR) should not be used because it is generally the end-of-packet character.
  1115.  When Kermit-370  is  running  through  a  full-duplex  connection  (such  as  a
  1116.  "SERIES1"),  the  traditional  IBM  handshaking is not necessary, and HANDSHAKE
  1117.  should be set to 0 (as long as the other Kermit can be instructed not to expect
  1118.  a  handshake).  Note the distinction between SET HANDSHAKE in Kermit-370 (where
  1119.  it defines a character to be sent) and in many micro Kermits (where it  defines
  1120.  a character to be expected).
  1121. 11.4. Kermit-370 Subcommands                                             Page 23
  1122. 0-------------------------------------------------------------------------------
  1123.  SET INCOMPLETE
  1124. 0Syntax: SET INCOMPLETE DISCARD or KEEP
  1125. 0DISCARD   Specifies that incomplete files (that is, files partially received in
  1126.            a transfer cancelled by the other Kermit) are to be erased.  This  is
  1127.            the  default.    Note  that when FILE COLLISION is APPEND, incomplete
  1128.            files are never erased, lest pre-existing data be lost.
  1129. 0KEEP      Specifies that incomplete files are to be kept.
  1130. 0
  1131.  SET LINE
  1132. 0Syntax: SET LINE [name]
  1133. 0This specifies an alternate communication line for file transfers.  If the name
  1134.  is omitted, the default line (the user's terminal) is used.  The format of name
  1135.  is, of course, system-dependent, and some variants of Kermit-370 do not support
  1136.  any alternate lines.  No variant currently allows Kermit-370 to CONNECT over an
  1137.  alternate line.
  1138. 0
  1139.  SET MARGIN
  1140. 0Syntax: SET MARGIN side column
  1141. 0When Kermit-370 sends a text file, each line may be truncated on  the  left  or
  1142.  right (or both) at fixed column numbers.  Only the text from the left margin to
  1143.  the right margin (inclusive) will be sent, and any trailing blanks in the trun-
  1144.  cated lines will be stripped.  A value of zero for either margin disables trun-
  1145.  cation on that side.
  1146. 0
  1147.  SET PROMPT
  1148. 0Syntax: SET PROMPT [string]
  1149. 0This defines the character string that Kermit-370 displays when  asking  for  a
  1150.  subcommand.   The prompt may be any string of up to 20 characters.  The default
  1151.  is the name of the system-specific variant of  Kermit-370  followed  by  a  ">"
  1152.  sign,  e.g.,  Kermit-CMS>.    If the string is omitted, normal system prompting
  1153.  will occur.
  1154. 0
  1155.  SET RETRY
  1156. 0Syntax: SET RETRY INITIAL or PACKETS number
  1157. 0Kermit-370 resends its last packet after receiving a NAK or bad packet, but  it
  1158.  eventually  gives  up after repeated failures on the same packet.  The limit on
  1159.  retries can be set separately for the initial  packet  exchange  (Send-Init  or
  1160.  server-mode  command)  and for ordinary packets.  The default for INITIAL is 16
  1161.  and for PACKETS, 5.  Either limit can be set to any positive value.
  1162. 11.4. Kermit-370 Subcommands                                             Page 24
  1163. 0-------------------------------------------------------------------------------
  1164.  SET SERVER-TIMEOUT
  1165. 0Syntax: SET SERVER-TIMEOUT time
  1166. 0This defines the time in seconds that Kermit-370 in server mode should wait for
  1167.  a command before sending a NAK packet.  The default is 120.  A value of 0 means
  1168.  that Kermit should wait indefinitely, not only in the server loop, but  in  all
  1169.  transfers, regardless of the timeout value specified by the other Kermit.  Some
  1170.  variants are unable to time out in any  case.    Also,  timeouts  are  not  im-
  1171.  plemented for any of the full-screen terminal controllers.
  1172. 0
  1173.  SET SPEED
  1174. 0Syntax: SET SPEED number
  1175. 0This determines the communication line speed assumed by Kermit-370 in calculat-
  1176.  ing the optimum packet size.  If the value is zero, such calculations are  sup-
  1177.  pressed.    This  option is purely informative and has no effect on actual line
  1178.  speed.  (Default 1200.)
  1179. 0
  1180.  SET SYSCMD
  1181. 0Syntax: SET SYSCMD ON or OFF
  1182. 0ON      If the user enters a command string which is not a valid Kermit subcom-
  1183.          mand,  Kermit-370 will pass the string along to the host operating sys-
  1184.          tem for execution.  If the string is rejected by the  system  as  well,
  1185.          Kermit will report it as an invalid Kermit subcommand.  Otherwise, Ker-
  1186.          mit will assume the string was intended as  a  host  command  and  will
  1187.          simply report the completion code if non-zero.
  1188. 0OFF     Invalid  Kermit  subcommands  are simply rejected as such.  System com-
  1189.          mands may be executed, of course, but only by  specifying  the  generic
  1190.          prefix "HOST" or the appropriate system-specific prefix, such as CMS or
  1191.          TSO.  (Default.)
  1192. 0
  1193.  SET TABS-EXPAND
  1194. 0Syntax: SET TABS-EXPAND ON [list] or OFF
  1195. 0ON      Tab characters in incoming TEXT files  are  replaced  by  one  or  more
  1196.          blanks to bring the record size up to the next higher multiple of eight
  1197.          for each tab.  If tab settings other than columns 1, 9,  17,  etc.  are
  1198.          desired,  they  may  be  specified  explicitly  in a list following the
  1199.          keyword "ON".  Items in the list may be separated by spaces  or  commas
  1200.          and must be in strictly increasing order.
  1201. 0OFF     Incoming tabs are retained.  (Default.)
  1202. 11.4. Kermit-370 Subcommands                                             Page 25
  1203. 0-------------------------------------------------------------------------------
  1204.  SET TAKE ECHO
  1205. 0Syntax: SET TAKE ECHO ON or OFF
  1206. 0ON      Subcommands are echoed to the terminal as they are executed from a TAKE
  1207.          file.
  1208. 0OFF     Subcommands from a TAKE file are executed "silently."  (Default.)
  1209. 0
  1210.  SET TAKE ERROR-ACTION
  1211. 0Syntax: SET TAKE ERROR-ACTION CONTINUE or HALT
  1212. 0CONTINUE   Execution continues in a TAKE file regardless of  illegal  commands,
  1213.             except in server mode.  (This is the default.)
  1214. 0HALT       A  command error in a TAKE file causes immediate exit to Kermit sub-
  1215.             command level.
  1216. 0
  1217.  SET TEST
  1218. 0Syntax: SET TEST ON or OFF
  1219. 0ON      Allow setting the START-OF-PACKET and other special characters  to  any
  1220.          value, and suppress type 1 checksum testing on received packets.
  1221. 0OFF     Normal operation.  (Default.)
  1222. 0
  1223.  SET TRANSFER CHARACTER-SET
  1224. 0Syntax: SET TRANSFER CHARACTER-SET name
  1225. 0Specifies  the  name  of  the character set used in sending or receiving files.
  1226.  This setting may be superseded by an Attribute  packet  of  an  incoming  file.
  1227.  Currently,  the  available  names  are  ASCII  (the  default), CYRILLIC, GREEK,
  1228.  HEBREW, JAPAN-EUC, KATAKANA, LATIN1, LATIN2,  LATIN3,  THAI,  and  TRANSPARENT.
  1229.  There  are  also  special aliases L1, L2, and L3 for the LATINx names.  All but
  1230.  JAPAN-EUC, TRANSPARENT, and ASCII represent 8-bit codes composed of a  pair  of
  1231.  94- or 96-character sets from the ISO registry combined with normal definitions
  1232.  for the so-called C0 and C1 characters.  JAPAN-EUC is a DBCS for encoding Kanji
  1233.  characters,  plus Roman, Greek, and Cyrillic.  ASCII is the traditional charac-
  1234.  ter set supported by Kermit,  but  one  of  the  newer,  8-bit  sets  would  be
  1235.  preferable  for  most  users.   This option is, therefore, a good candidate for
  1236.  inclusion in the system INIT file.  See Table 1-1 for the allowed  combinations
  1237.  of transfer and file character sets.  Explicitly setting this option has a side
  1238.  effect equivalent to issuing SET ATTRIBUTE ENCODING ON (q.v.).   There  is  one
  1239.  exception,  namely,  TRANSPARENT,  which  sets  ENCODING  OFF and replaces both
  1240.  translation tables with null operations, regardless of the current nominal file
  1241.  character set.
  1242. 0The  biggest  drawback of the built-in tables for the various character sets is
  1243.  that neither the ISO registry nor  IBM  defines  any  mapping  between  the  C1
  1244.  characters  (hex  80-9F  in ISO arrangements) and the characters of EBCDIC code
  1245. 11.4. Kermit-370 Subcommands                                             Page 26
  1246. 0-------------------------------------------------------------------------------
  1247.  pages.  Thus, the mappings in Kermit-370 tables are somewhat arbitrary, and fu-
  1248.  ture pronouncements may suddenly invalidate some or all of those 32 mappings.
  1249. 0
  1250.  SET TRANSFER LOCKING-SHIFT
  1251. 0Syntax: SET TRANSFER LOCKING-SHIFT ON or OFF or FORCED
  1252. 0ON      The Kermit locking-shift protocol is to be used in transfers to or from
  1253.          cooperating partners, provided that 8th-bit quoting is enabled.
  1254. 0OFF     The Kermit locking-shift protocol is not to be used.
  1255. 0FORCED  The Kermit locking-shift protocol is to  be  used,  regardless  of  the
  1256.          cooperation  of  the  other Kermit.  The encoding uses only the locking
  1257.          shifts, to the exclusion of 8th-bit quoting.
  1258. 0
  1259.  SET TTABLE
  1260. 0Syntax: SET TTABLE ON or OFF or KP
  1261. 0ON      The translation that undoes the terminal controller's ASCII/EBCDIC con-
  1262.          version comes from the TATOE and TETOA tables, rather than the ATOE and
  1263.          ETOA tables (which are used only for translating disk files).  This op-
  1264.          tion  has  no  effect  when there is no translation built into the con-
  1265.          troller, i.e., with SERIES1, GRAPHICS, and AEA connections.
  1266. 0OFF     The ATOE and ETOA tables are used for all translations  by  Kermit-370.
  1267.          (Default.)
  1268. 0KP      Same  as  ON, but also establishes values in the TATOE and TETOA tables
  1269.          based on IBM's corporate standard  ASCII/EBCDIC  translation  (distinct
  1270.          from the internationally accepted de facto standard).
  1271. 0
  1272.  SET 8-BIT-QUOTE
  1273. 0Syntax: SET 8-BIT-QUOTE char or ON or OFF
  1274. 0This  controls  whether eighth-bit prefixing is done and can be used to specify
  1275.  the character to be used.  This is one of only two  Send-Init  parameters  that
  1276.  cannot be SET separately for SEND and RECEIVE.
  1277. 0char    Eighth-bit prefixing will be done using char, provided the other Kermit
  1278.          agrees.  The default value is an ampersand.
  1279. 0ON      Eighth-bit prefixing will be done, provided the other Kermit explicitly
  1280.          requests it (and specifies the character).
  1281. 0OFF     Eighth-bit prefixing will not be done.
  1282. 11.4. Kermit-370 Subcommands                                             Page 27
  1283. 0-------------------------------------------------------------------------------
  1284.  SET SEND/RECEIVE
  1285. 0The  following  parameters  can be set either as SEND or RECEIVE options.  As a
  1286.  rule, in each pair, one is the operational value, and  the  other  is  used  to
  1287.  change  the default for Send-Init packets received from the other Kermit and to
  1288.  set up parameter values as if the other Kermit had specified them on  the  pre-
  1289.  vious  exchange.    When both values are described, the operational one will be
  1290.  first.  For all parameters besides QUOTE, the operational value is the RECEIVE.
  1291.  After  a transfer, the operational values will be unchanged, but the others (as
  1292.  displayed by SHOW) will reflect the parameters specified by the  other  Kermit.
  1293.  The  underlying  defaults established by previous SET subcommands will still be
  1294.  in effect.  In the syntax descriptions, mode is SEND or RECEIVE.
  1295. 0
  1296.  END-OF-LINE
  1297. 0Syntax: SET mode END-OF-LINE number
  1298. 0RECEIVE should not be changed.
  1299. 0SEND may be needed to establish contact.  If the other system needs packets  to
  1300.  be terminated by anything other than carriage return, specify the decimal value
  1301.  of the desired ASCII character.  number must be in the  range  0-31  (decimal).
  1302.  The default is 13 (CR).
  1303. 0
  1304.  PACKET-SIZE
  1305. 0Syntax: SET mode PACKET-SIZE number
  1306. 0RECEIVE  defines  number as the maximum length for incoming packets.  The valid
  1307.  range is 26-9024, but 94 is the limit for normal short-packet  protocol.    The
  1308.  default  is 80.  Specifying a value greater than 94 is necessary and sufficient
  1309.  to enable the long-packet protocol for transfers to  Kermit-370  (provided  the
  1310.  other  Kermit is willing).  Kermit-370 will actually accept long packets in any
  1311.  case, but the protocol requires that the other  Kermit  not  send  them  unless
  1312.  Kermit-370  asks.   Raising this value from the default is a good candidate for
  1313.  inclusion in INIT files.  In practice,  the  packet  size  may  be  limited  by
  1314.  hardware  and programming considerations.  See the system-specific chapters for
  1315.  details.
  1316. 0SEND might be needed for  sending  files  to  a  minimal  Kermit  that  neither
  1317.  specifies  a  buffer  size in the Send-Init sequence nor can accept the default
  1318.  (80).  It may also be used to specify the packet size for a "raw" download  via
  1319.  the  XTYPE  subcommand.  This parameter has no other function and is completely
  1320.  irrelevant to long packets.   If  the  other  Kermit  asks  for  long  packets,
  1321.  Kermit-370 will always comply.
  1322. 0
  1323.  PAD-CHAR
  1324. 0Syntax: SET mode PAD-CHAR number
  1325. 0RECEIVE defines number as the character to be used by the other Kermit for pad-
  1326.  ding packets.  The character must be an ASCII control character (in  the  range
  1327.  0-31).  The default is 0 (NULL).  This option is seldom useful.
  1328. 11.4. Kermit-370 Subcommands                                             Page 28
  1329. 0-------------------------------------------------------------------------------
  1330.  SEND  may  be needed to establish contact if the other Kermit (or the transmis-
  1331.  sion line) needs padded packets.
  1332. 0
  1333.  PADDING
  1334. 0Syntax: SET mode PADDING number
  1335. 0RECEIVE defines the number of pad characters to be  used  for  padding  packets
  1336.  from  the other Kermit.  This number may be anywhere from 0 to 94.  The default
  1337.  is 0.  This option is seldom useful.
  1338. 0SEND may be needed to establish contact if the other Kermit (or  the  transmis-
  1339.  sion line) needs padded packets.
  1340. 0
  1341.  PARITY
  1342. 0Syntax: SET mode PARITY MARK or NONE
  1343. 0RECEIVE  specifies  the  parity  expected  in  the  transparent-mode ASCII data
  1344.  received by the mainframe from a full-screen device.  Such data will  typically
  1345.  have  either  all  Mark  parity (seven data bits with the eighth bit set) or no
  1346.  parity (eight data bits).  This is typically not the same as the parity used in
  1347.  communications  between  the  protocol  convertor and the terminal.  Kermit-370
  1348.  must know which kind of parity  to  expect  in  order  to  calculate  checksums
  1349.  properly.  Since Kermit-370 does not actually verify parity, the other possible
  1350.  variants (ODD, EVEN, and SPACE) are lumped together with MARK  parity  for  the
  1351.  purpose  of  this subcommand, which merely chooses between 7-bit and 8-bit data
  1352.  transfer.  The default is MARK.
  1353. 0SEND is also an operational value, specifying the parity to  be  used  in  con-
  1354.  structing  outgoing  data  packets on full-screen devices.  NONE is the default
  1355.  and is generally preferable, in that it permits binary  transfers  without  the
  1356.  need for eighth-bit prefixing, but MARK may be required in some configurations.
  1357. 0
  1358.  QUOTE
  1359. 0Syntax: SET mode QUOTE char
  1360. 0SEND indicates a printable character for prefixing (quoting) control characters
  1361.  and  other prefix characters.  The only good reason to change this would be for
  1362.  sending a file that contains many "#" characters (the normal control prefix) as
  1363.  data.    It  must  be  a  single  character  with  ASCII  value 33-62 or 96-126
  1364.  (decimal).
  1365. 0RECEIVE would be needed only for talking to  a  crippled  Kermit  that  uses  a
  1366.  non-standard quoting character, but does not admit it.
  1367. 11.4. Kermit-370 Subcommands                                             Page 29
  1368. 0-------------------------------------------------------------------------------
  1369.  START-OF-PACKET
  1370. 0Syntax: SET mode START-OF-PACKET number
  1371. 0RECEIVE  defines  number  as  the character to be expected to mark the start of
  1372.  packets from the other Kermit.  The character must be an ASCII control  charac-
  1373.  ter  (in the range 0-31).  The default is 1 (SOH).  This may need to be changed
  1374.  to establish contact.
  1375. 0SEND may also need to be changed to establish contact.  It  defines  number  as
  1376.  the character to be used to mark outgoing packets.
  1377. 0
  1378.  TIMEOUT
  1379. 0Syntax: SET mode TIMEOUT time
  1380. 0RECEIVE  defines the time in seconds the other Kermit is to wait for a response
  1381.  from Kermit-370 before resending a packet.  The default is 5.   A  value  of  0
  1382.  means the other Kermit should wait indefinitely.
  1383. 0SEND  may  be  needed to define the time in seconds Kermit-370 is to wait for a
  1384.  response from the other Kermit in the initial  packet  exchange,  although  the
  1385.  default  value  0  (indefinite wait) is probably satisfactory, especially since
  1386.  Kermit-370 in many cases cannot time out anyway.  Specifying a  non-zero  value
  1387.  will  prevent  the  other  Kermit from ever requesting infinite "patience" from
  1388.  Kermit-370.
  1389. 0
  1390.                                THE SHOW SUBCOMMAND
  1391. 0Syntax: SHOW [option]
  1392. 0The SHOW subcommand displays the values of all parameters that can  be  changed
  1393.  with  the  SET  subcommand, except ATOE, ETOA, TATOE, and TETOA (for those, see
  1394.  the TDUMP subcommand).  If specified, option can be a particular  parameter  or
  1395.  the  keyword  "ALL"  (the default).  Groups of parameters, such as SEND, can be
  1396.  displayed by requesting the group name, or  individual  sub-parameters  can  be
  1397.  displayed by specifying the complete name.  For example,
  1398. 0  SHOW RECEIVE EOL
  1399. 0will  display  the  decimal value of the packet terminator that Kermit-370 cur-
  1400.  rently expects, i.e., 13.  Similarly,
  1401. 0  SHOW FOREIGN
  1402. 0will display the character strings currently in use for prefix  and  suffix  on
  1403.  each  outgoing  filespec.    When "ALL" is specified or implied, all parameters
  1404.  other than the attribute switches are displayed.
  1405. 11.4. Kermit-370 Subcommands                                             Page 30
  1406. 0-------------------------------------------------------------------------------
  1407.                               THE STATUS SUBCOMMAND
  1408. 0Syntax: STATUS
  1409. 0This subcommand displays information about the previously executed  subcommand.
  1410.  The  response  will include either the appropriate error message or the message
  1411.  "No errors".  The initial status is "No file transfers yet".    If  the  status
  1412.  reflects  an  error  condition,  the name of the last file used (excluding TAKE
  1413.  files) will be displayed as well.  If the error was detected by the other  Ker-
  1414.  mit,  the  message  will be "Micro aborted" followed by the text from the Error
  1415.  packet.  Conversely, if Kermit-370 detected the error, the text of  the  status
  1416.  message  will  have constituted the error packet sent out.  In any case, if the
  1417.  last file transfer was cancelled (by virtue of an attribute mismatch or  manual
  1418.  intervention),  the  reason  for cancellation is displayed.  Also, if the error
  1419.  occurred in disk I/O, any available explanatory information is displayed.  Nor-
  1420.  mally,  the  error status is altered only when a transfer-initiating subcommand
  1421.  (SEND or RECEIVE) is executed, but there are several exceptions.  If an invalid
  1422.  subcommand  is entered, the status becomes "Kermit command error", and the next
  1423.  subcommand entered will reset the status.  Also, in server mode  every  subcom-
  1424.  mand  is  received  through a transfer from the other Kermit and may affect the
  1425.  status (except the STATUS subcommand itself, of course).
  1426. 0Other information is also included.  When Kermit-370 has been forced  to  trun-
  1427.  cate  one or more records in the last RECEIVE operation (because of the current
  1428.  maximum record length), the number of  records  truncated  is  reported.    The
  1429.  status  display also includes throughput statistics for the last transfer: num-
  1430.  ber of files sent, duration, number of packets, number of retries, and averages
  1431.  of  bytes/packet  and  bytes/second.   These last two quantities are calculated
  1432.  separately for bytes sent and received on  the  communication  line  (including
  1433.  padding,  if any), and the last quantity is also calculated on the basis of the
  1434.  number of bytes read from or written to disk.  Further, if retries were  neces-
  1435.  sary,  Kermit-370 computes the optimum packet size assuming the retries to have
  1436.  been due to sparse, Poisson-distributed bursts of noise.    This  is  the  same
  1437.  heuristic   optimum  that  Kermit-370  computes  and  uses  as  an  alternative
  1438.  packet-size limit when sending long packets.  If TEST is set  on,  Kermit  also
  1439.  reports the maximum size attained by its storage stack since execution began.
  1440. 0
  1441.                                THE STOP SUBCOMMAND
  1442. 0Syntax: STOP
  1443. 0This  is  not a subcommand in the usual sense.  Instead, it is a command string
  1444.  that can be entered on the communication line while Kermit-370 is  in  protocol
  1445.  mode  and will cause protocol mode to cease immediately.  This may be useful if
  1446.  the other Kermit has crashed.  The word "stop" may be entered in  either  upper
  1447.  or  lower  case,  but  it  must be the only character string in the "packet" in
  1448.  question.
  1449. 11.4. Kermit-370 Subcommands                                             Page 31
  1450. 0-------------------------------------------------------------------------------
  1451.                                THE TAKE SUBCOMMAND
  1452. 0Syntax: TAKE filespec
  1453. 0Execute Kermit subcommands from the specified file, usually called a TAKE file.
  1454.  The  TAKE  file  may in turn include TAKE subcommands, and the nesting may con-
  1455.  tinue to a depth of ten.  If  a  TAKE  file  includes  the  subcommand  SERVER,
  1456.  however,  the  nesting  count  is saved and starts over again in server mode in
  1457.  case the client Kermit should transmit a REMOTE KERMIT TAKE command.  The  user
  1458.  has  the option of seeing the subcommands echoed from the TAKE file as they are
  1459.  executed and also the option of automatically exiting from a TAKE file  on  er-
  1460.  ror.  See the subcommand SET TAKE for details.
  1461. 0
  1462.                               THE TDUMP SUBCOMMAND
  1463. 0Syntax: TDUMP table-name or NAMES
  1464. 0This displays the contents of table-name.  The same table can be modified using
  1465.  the SET subcommand.  The ATOE, ETOA, TATOE, and TETOA tables can  presently  be
  1466.  displayed  and  changed.    The NAMES table is the transaction log for the last
  1467.  transfer, consisting of the filespec of each file sent or received, along  with
  1468.  the size (in Kbytes) and any error messages.
  1469. 0
  1470.                          THE TYPE AND XTYPE SUBCOMMANDS
  1471. 0Syntax: [X]TYPE filespec
  1472. 0These  subcommands  display  the named file.  TYPE is effectively a synonym for
  1473.  (and allows the same options as) the host system command for  displaying  files
  1474.  at  the  terminal,  but  XTYPE performs a raw file transfer on the current com-
  1475.  munication line (which need not be the terminal) according to the current  CON-
  1476.  TROLLER  setting.   Thus, XTYPE uses transparent mode if CONTROLLER is SERIES1,
  1477.  GRAPHICS, or AEA.  Also, it sends the data in bursts no larger than the current
  1478.  SEND  PACKET-SIZE.    Since XTYPE is basically a modified SEND, the options al-
  1479.  lowed on the filespec for SEND are also allowed for XTYPE.
  1480. 0
  1481.  1.5. Before Connecting to the Mainframe
  1482. 0Several options must be set in the micro Kermit before connecting to an IBM 370
  1483.  system  as  a  line-mode  device.  You should set LOCAL-ECHO to ON (to indicate
  1484.  half-duplex).  This is the norm but not true in absolutely every case; if  each
  1485.  character  appears  twice  on  your  terminal  screen,  set  LOCAL-ECHO to OFF.
  1486.  FLOW-CONTROL should be set to NONE, and on some systems HANDSHAKE should be set
  1487.  to XON.  The parity should be set according to the system's specifications.  On
  1488.  some micro Kermits, all of the above is done in one step using the DO IBM macro
  1489.  (or SET IBM ON).  Set the baud rate to correspond to the line speed.
  1490. 0Connecting  through  a full-screen device also requires that certain options be
  1491.  set in the micro Kermit.   You  should  set  LOCAL-ECHO  to  OFF  (to  indicate
  1492.  full-duplex).   FLOW-CONTROL should be set to XON/XOFF, and HANDSHAKE should be
  1493.  set to OFF.  For many systems, the PARITY should be set to EVEN.  Set the  baud
  1494.  rate to correspond to the line speed.
  1495. 0One  exception  to these rules is the case where the micro Kermit is attempting
  1496. 11.5. Before Connecting to the Mainframe                                 Page 32
  1497. 0-------------------------------------------------------------------------------
  1498.  automated  file  transfer,  e.g.,  downloading  several  separate  files   from
  1499.  Kermit-370  running  in server mode.  In fact, under those circumstances, hand-
  1500.  shaking is necessary even with "SERIES1" connections, and the two Kermits  must
  1501.  be  instructed to adopt a common handshake character (e.g., by SET HANDSHAKE 10
  1502.  to Kermit-370 and SET HANDSHAKE LF to the micro).
  1503. 0In any case, you should make sure that either the micro  Kermit  or  Kermit-370
  1504.  will  provide  timeouts  during file transfers (if not both).  Some variants of
  1505.  Kermit-370 (notably CMS) cannot provide timeouts, and you may need to  set  the
  1506.  TIMER to ON in the micro.
  1507. 0When  you are connecting through a protocol convertor, it is useful to know the
  1508.  key sequence that causes the screen image to be repainted from the controller's
  1509.  memory.  In many cases, it is CTRL-V, although CTRL-G and CTRL-C are also some-
  1510.  times used.  In general, this sequence should be typed whenever reconnecting to
  1511.  Kermit-370  after being in Kermit protocol mode (and sometimes after merely es-
  1512.  caping to the local Kermit), since the  local  Kermit  may  have  modified  the
  1513.  screen.
  1514. 0
  1515.  1.6. Trouble-shooting Protocol Converters
  1516. 0Many,  but not all, protocol converters have transparent modes that permit Ker-
  1517.  mit file transfers.  The welter of competing and often incompatible  communica-
  1518.  tions  devices  would  cause  a major headache, except for three circumstances.
  1519.  First, Kermit-370 has routines for automatically detecting which kind of  front
  1520.  end  is  controlling  the  current session; second, the Kermit installer is en-
  1521.  couraged to tailor Kermit to force the correct choice  of  CONTROLLER  whenever
  1522.  those  routines  don't  work  properly; and, third, Kermit offers a last-resort
  1523.  mode of operation that will work with almost any protocol converter.    Because
  1524.  of  the  limitations  in  the  catch-all mode (known as FULLSCREEN mode), it is
  1525.  still best to take advantage of the transparency, if any, in the protocol  con-
  1526.  verter,  and the automatic detection routines still play an important role.  It
  1527.  will be instructive to outline what those routines actually do and how they can
  1528.  go wrong.
  1529. 0
  1530.  Recognizing a Series/1
  1531. 0Although  protocol  converters are advertised as simulating the behavior of IBM
  1532.  3270-type terminals, there generally are differences which  could  be  used  to
  1533.  distinguish  each  type  of device from the others and from real 3270-type ter-
  1534.  minals.  However, all that really matters to Kermit-370 is whether there  is  a
  1535.  transparent  mode  available  such  that file transfers can be carried out.  To
  1536.  date, only three fundamentally different transparent modes have  been  reported
  1537.  to  Columbia,  and  it seems likely that no others have been (or, perhaps, ever
  1538.  will be) implemented.  All are supported by Kermit.
  1539. 0Kermit-370 recognizes these front  ends  automatically  by  making  two  simple
  1540.  tests.    The  first  takes advantage of one of the advanced features first im-
  1541.  plemented in the Yale ASCII system and  subsequently  copied  in  many  of  the
  1542.  devices that adopted the same transparent mode.  This feature is a special 3270
  1543.  data-stream order which requests a status report from the  protocol  converter.
  1544.  Kermit  sends  this  order  and then reads the "3270 screen".  If Kermit sees a
  1545.  valid status report, it sets CONTROLLER to SERIES1 and stops testing.
  1546. 11.6. Trouble-shooting Protocol Converters                               Page 33
  1547. 0-------------------------------------------------------------------------------
  1548.  Two catches
  1549. 0Obviously, the Yale status order is not implemented  in  most  other  kinds  of
  1550.  hardware.  Thus, the order would be rejected by a non-Yale-type controller, and
  1551.  that could have undesirable side effects on the hardware.  However, hardware is
  1552.  generally  designed  to be robust -- the real drawback lies in the side effects
  1553.  on certain communications software (notably VTAM/TSO), which may respond  badly
  1554.  while  trying to protect the robust hardware from illegal orders.  If it proves
  1555.  impossible to make the external software behave properly, the only recourse  is
  1556.  to  modify  Kermit-370  to skip the first test altogether and possibly to force
  1557.  the CONTROLLER setting; this modification is described in the relevant "Beware"
  1558.  file in a note dated 89/2/27.
  1559. 0Catch  Two  is  that  the status order is not implemented in all of the devices
  1560.  that support Yale-ASCII-style transparent mode.  This means that  some  devices
  1561.  "fall  through  the  cracks"  in this procedure.  A site where such devices are
  1562.  used may find it expedient to modify Kermit (following the same  "Beware"  pat-
  1563.  tern)  to  force the procedure to set CONTROLLER to SERIES1 (assuming there are
  1564.  no other protocol converters also in use that support one of the  other  trans-
  1565.  parent modes).  A list of such devices can be found in a footnote in the Kermit
  1566.  distribution file ik0aaa.hlp.
  1567. 0
  1568.  Recognizing a 3174
  1569. 0The second diagnostic test uses a hardware command (Read Partition Query)  that
  1570.  is  defined  by  IBM, but is not implemented on all 3270-type equipment.  There
  1571.  is, thus, the same danger as in the first test, but the danger  appears  to  be
  1572.  slight.    Indeed,  both  CMS  and  TSO allow a user program to know in advance
  1573.  whether a Query is permitted.  The Query  response  consists  of  one  or  more
  1574.  structured fields, and the 3174 AEA ASCII Graphics system (the only device with
  1575.  the AEA style of transparency) is easily identified by the appearance and  con-
  1576.  tent  of  a particular type of field.  In fact, it is possible to tell from the
  1577.  Query data whether the particular  3174  line  is  allowed  to  use  the  ASCII
  1578.  Graphics  transparency.  Therefore, this test has three possible outcomes: Ker-
  1579.  mit may detect a transparency-enabled 3174 line (and set CONTROLLER to AEA); it
  1580.  may  detect  an  incapable  3174  line  (and set CONTROLLER to NONE); or it may
  1581.  detect "none of the above" (and set CONTROLLER to GRAPHICS).  Thus, aside  from
  1582.  the  exceptions  already noted, GRAPHICS simply means that the front end either
  1583.  supports SAS-style transparency or none at all.
  1584. 0
  1585.  Fallback positions
  1586. 0What should you do when the automatic detection fails?   Obviously,  the  first
  1587.  thing is Be Prepared.  Often, the misbehavior of VTAM can be halted by pressing
  1588.  ENTER or PA1, so you should be sure to know how to generate a PA1  when  trying
  1589.  out  Kermit on an unfamiliar type of protocol converter.  Also, you should know
  1590.  what kind of  transparency  to  expect  for  the  front  end  and  verify  that
  1591.  Kermit-370 has, in fact, set CONTROLLER appropriately.  This means checking the
  1592.  list of devices in the Kermit distribution file ik0aaa.hlp.  If your configura-
  1593.  tion  is  listed  as unsupported, you may be wasting your time, but the list is
  1594.  not necessarily up-to-date.  If your configuration is not listed  at  all,  you
  1595.  have  the opportunity to be a pioneer and report your findings back to Columbia
  1596.  for inclusion in future editions of the list.  There are a few rules  of  thumb
  1597.  for quickly deducing the controller type by reading the manuals for the device;
  1598. 11.6. Trouble-shooting Protocol Converters                               Page 34
  1599. 0-------------------------------------------------------------------------------
  1600.  the manuals may not be specific enough, but this is clearly the easiest way  of
  1601.  determining whether Kermit can support a given device and which controller type
  1602.  is applicable.    The  rules  are  as  follows  (in  order  of  simplicity  and
  1603.  likelihood):
  1604. 0   1. GRAPHICS or SERIES1 may be implied when the device has a transparent
  1605.        or graphics mode described as compatible with that  of  a  supported
  1606.        device listed in ik0aaa.hlp.
  1607. 0   2. SERIES1  is  implied when the device runs the "Yale ASCII Communica-
  1608.        tion System" or something with a similar name.
  1609. 0   3. GRAPHICS is implied if the manual mentions the SAS Institute in  the
  1610.        context of ASCII graphics.
  1611. 0   4. GRAPHICS  is implied when output transparent data may be preceded by
  1612.        a WCC (Write Control Character) and 70 (hex).
  1613. 0   5. SERIES1 is implied when transparent data must be preceded by  a  WCC
  1614.        and either 115D7F110005 (write-read) or 115D7F110000 (write-only).
  1615. 0   6. GRAPHICS  or  SERIES1 may be implied when some of the manufacturer's
  1616.        other products are listed in ik0aaa.hlp, and all are shown as  being
  1617.        of one type.
  1618. 0   7. If  none of the above rules apply, but the manuals describe a trans-
  1619.        parent mode in detail, the device may be a totally new  type.    The
  1620.        distribution  file  ik0con.hlp has hints on implementing Kermit sup-
  1621.        port for the new type.
  1622. 0   8. If nothing else works, you can probably use FULLSCREEN mode, as long
  1623.        as the micro Kermit supports it.
  1624. 0If  Kermit tries to transfer a file with the wrong CONTROLLER value, there is a
  1625.  distressing possibility for the session to lock or, at least, appear  to  lock.
  1626.  When  and  if  this  happens,  be  sure  to connect back to the mainframe, type
  1627.  "STOP", and press ENTER several times (perhaps as  many  as  15  times)  before
  1628.  taking any drastic steps like breaking the connection.  "STOP" is a special es-
  1629.  cape mechanism for getting out of Kermit protocol  mode  quickly.    Kermit-370
  1630.  recognizes such a request in most situations where terminal I/O is not entirely
  1631.  frozen.  Sometimes, apparent lock-ups are due to something as simple as  incor-
  1632.  rect  parity settings in the micro Kermit, so always check the basic communica-
  1633.  tion settings and, if necessary, experiment  before  trying  a  different  CON-
  1634.  TROLLER type.  Also, to avoid unnecessary confusion, check for the existence of
  1635.  a Kermit initialization file (possibly created by the installer) which could be
  1636.  re-setting  CONTROLLER  after  the  automatic  procedure  has finished.  Such a
  1637.  re-setting is a poor idea in an initialization file, even a personal  one,  un-
  1638.  less there is absolutely only one kind of communications equipment on your sys-
  1639.  tem.
  1640. 0If file transfers do not work at first, it is best to do the  following  before
  1641.  trying again:
  1642. 0   1. Reduce the packet size to no more than 80 at both ends.
  1643. 0   2. Enable 8th-bit quoting at both ends.
  1644. 11.6. Trouble-shooting Protocol Converters                               Page 35
  1645. 0-------------------------------------------------------------------------------
  1646.     3. Set SEND PARITY MARK in Kermit-370.
  1647. 0If  those  changes do not make transfers work, the next remedial action depends
  1648.  on the symptoms of failure.
  1649. 0   - No packets exchanged and session locked up after reconnecting: change
  1650.       packet characters in both directions.
  1651. 0   - No  packets  exchanged,  but  no  lockup: change packet characters or
  1652.       parity.
  1653. 0   - Always multiple retries of third or fourth packet:  reduce  receiving
  1654.       packet size.
  1655. 0   - Multiple  retries  after random number of packets: check hardware and
  1656.       cables.
  1657. 0   - Multiple retries after file-dependent number of  packets:  check  for
  1658.       equipment  that intercepts one or more printable characters or reduce
  1659.       the packet size.
  1660. 0When all else fails, you should be ready to reset CONTROLLER by  hand  and  try
  1661.  again.    The  change  most likely to be necessary is from GRAPHICS to SERIES1.
  1662.  However, it is conceivable that the installer has modified Kermit-370  at  your
  1663.  location  to  force  the  CONTROLLER setting from the start, in which case, you
  1664.  might need to go the other way.  Normally,  Kermit's  diagnostic  procedure  at
  1665.  start-up takes one or two seconds (because of programmed delays), so you should
  1666.  be suspicious if the Kermit prompt appears  immediately  after  you  start  the
  1667.  program.    The  only  initial CONTROLLER setting that you should not change by
  1668.  hand is NONE, which means that Kermit-370 has recognized a 3174 AEA  line  that
  1669.  is  not configured for file transfer (or else the Kermit installer has a warped
  1670.  sense of humor).
  1671. 0If no amount of experimenting gets a transparent mode to work, it  is  time  to
  1672.  recheck  the list of supported devices and the age of your equipment.  If yours
  1673.  is very old, it may require new microcode or some other  software  or  hardware
  1674.  upgrade.    In any case, if your results (whether positive or negative) are not
  1675.  already shown in ik0aaa.hlp, you should report them to Columbia so that  others
  1676.  may profit by your experience.
  1677. 0
  1678.  1.7. After Returning from Kermit-370
  1679. 0When  Kermit-370  receives a QUIT or EXIT subcommand or finishes the subcommand
  1680.  or subcommands specified in the original command string  that  invoked  Kermit,
  1681.  control is returned to the caller.  Before returning, Kermit-370 closes any ac-
  1682.  tive TAKE files (the EXIT or QUIT subcommand may be issued from a  TAKE  file).
  1683.  On  return,  the completion code is set from the current error status according
  1684.  to the codes in Table 1-4.
  1685. 0The error codes in Table 1-4 bear no relationship to the severity  of  the  as-
  1686.  sociated error conditions, aside from the assignment of code 0.  The underlying
  1687.  rationale is that the only current generic system for the treatment of  comple-
  1688.  tion  codes is to take a non-zero code as an indication of error.  Indeed, Ker-
  1689.  mit returns a completion code of 0 when "error" condition 1 holds.
  1690. 11.8. What's New                                                         Page 36
  1691. 0-------------------------------------------------------------------------------
  1692.  -------------------------------------------------------------------------------
  1693. 0
  1694.  Code  Symbol  Error Message
  1695.   0    NOE     No errors
  1696.   1    NFT     No file transfers yet
  1697.   2    TRC     Transfer cancelled
  1698.   3    USC     Invalid server command
  1699.   4    TIE     Terminal I/O error
  1700.   5    BPC     Bad packet count or chksum
  1701.   6    IPS     Invalid packet syntax
  1702.   7    IPT     Invalid packet type
  1703.   8    MIS     Lost a packet
  1704.   9    NAK     Micro sent a NAK
  1705.  10    ABO     Micro aborted
  1706.  11    FNE     Invalid file name
  1707.  12    FNF     File not found
  1708.  13    FUL     Disk or file is full
  1709.  14    DIE     Disk I/O error
  1710.  15    MOP     Missing operand
  1711.  16    SYS     Illegal system command
  1712.  17    KCE     Kermit command error
  1713.  18    TIM     No packet received
  1714.  19    RTR     Records truncated
  1715.  20    COM     Bad communication line
  1716.  21    PTY     8th-bit quote not set
  1717.  22    FTS     File too short
  1718.  23    SOH     Missing start-of-packet
  1719.  24    OPT     Option error on filespec
  1720.  25    DSP     Unable to dispose of file
  1721. 0              Table 1-4:  Error messages and codes for Kermit-370
  1722. 0
  1723. 0-------------------------------------------------------------------------------
  1724. 0
  1725.  1.8. What's New
  1726. 0Below is a list of the changes in Version 4.2.3 of Kermit-370.
  1727. 0   1. Compatibility with the (aging) F-level assembler.
  1728. 0   2. Support for LATIN2, LATIN3, TRANSPARENT, CP870, CP905, and CP880, as
  1729.        well as the aliases L1, L2, and L3.
  1730. 0   3. Support for IBM 3174 ASCII Graphics mode.
  1731. 0   4. Support for REMOTE PRINT, REMOTE MAIL, and REMOTE SUBMIT.
  1732. 0   5. Improved  error message for bad packet-size, new alias PACKET-LENGTH
  1733.        for PACKET-SIZE.
  1734. 0   6. Correct observance of FILE COLLISION for all files in a group.
  1735. 0   7. Ignoring  spurious  flow-control  "packets"   from   (for   example)
  1736. 11.8. What's New                                                         Page 37
  1737. 0-------------------------------------------------------------------------------
  1738.        MS-Kermit.
  1739. 0   8. Support for new locking-shift Kermit protocol.
  1740. 0   9. Support for Japanese Kanji file transfer.
  1741. 0  10. New FULLSCREEN controller type.
  1742. 0  11. New HINTS subcommand.
  1743. 0  12. More graceful recovery from terminal I/O errors and exceptions.
  1744. 0  13. Support for SNA LU1 3770-type devices and 8-bit, no-parity devices.
  1745. 0  14. Automatic  conversion  of EBCDIC printer carriage control into ASCII
  1746.        control characters.
  1747. 0  15. Support for STOP command on "dumb" 3270 terminals and  PCI  protocol
  1748.        converters.
  1749. 0  16. New efficiency display in STATUS report, based on SPEED setting.
  1750. 0  17. 8-bit XECHO output.
  1751. 0  18. Control prefixing for C1 controls.
  1752. 0  19. New VERSION subcommand.
  1753. 0  20. Improved debugging facilities.
  1754. 0
  1755.  1.9. What's Missing
  1756. 0Work  on  Kermit-370 will continue.  Features that need to be improved or added
  1757.  include:
  1758. 0   - Implement file archiving.
  1759. 0   - Implement file transfer checkpointing.
  1760. 0   - Add SET REPEAT subcommand.
  1761. 0   - Improve Kermit-370 operation as a local Kermit.
  1762. 0   - Implement public server mode.
  1763. 0   - Add new SET FILE LONGLINE DISCARD option to allow multi-file transfer
  1764.       to proceed past a truncation problem.
  1765. 0   - System-specific upgrades; see the respective chapters for details.
  1766. 0Anyone interested in working on these or other improvements should first get in
  1767.  touch with the Center for Computing Activities at Columbia University  to  find
  1768.  out if someone else has already begun a similar project (and, if so, who).
  1769. 11.10. Further Reading                                                   Page 38
  1770. 0-------------------------------------------------------------------------------
  1771.  1.10. Further Reading
  1772. 0Below is a list of references for some of the material in this chapter.
  1773. 0   1. About  Type:  IBM's  Technical Reference for 240-Pel Digitized Type,
  1774.        S544-3156-02 (1989).  This manual contains  visual  tables  of  many
  1775.        EBCDIC  code  pages  and a comprehensive list of character names and
  1776.        acronyms.
  1777. 0   2. IBM System/370 Reference Summary, GX20-1850-3 (1976).   This  refer-
  1778.        ence card contains EBCDIC and ASCII character codes.
  1779. 0   3. IBM   VS   Fortran   Application  Programming:  Language  Reference,
  1780.        GC26-3986-1 (1982).  Appendix E contains a table of EBCDIC and ASCII
  1781.        characters with an implied full 256-byte translation table.
  1782. 0   4. IBM  3174  Character  Set Reference, GA27-3831-02 (1990).  Chapter 5
  1783.        contains visual tables of many EBCDIC code pages.
  1784. 0   5. Info-Kermit Digest Vol. 11 #1 (1989).   This  issue  contains  draft
  1785.        specifications of some Kermit protocol extensions.
  1786. 0   6. ISO  International  Register of Coded Character Sets to be used with
  1787.        Escape Sequences (1989).  This (very large)  document  has  complete
  1788.        and  unambiguous  descriptions of standard coded character sets.  It
  1789.        can be obtained from the ECMA.
  1790. 0   7. Kermit, A File Transfer Protocol by Frank  da  Cruz;  Digital  Press
  1791.        (1987).    This  book  contains a thorough description of the Kermit
  1792.        protocol and services with copious examples.
  1793. 0   8. Kermit distribution file ISOK5.TXT (1990).  This  preliminary  draft
  1794.        describes  the  new  transfer  protocol, including the international
  1795.        character-set support.
  1796. 0   9. Kermit News Vol. 3 #1, p.5, "Dynamic Packet  Size  Control"  (1988).
  1797.        This article describes an algorithm for optimizing Kermit throughput
  1798.        in the face of line noise.
  1799. 0  10. Kermit News #4, p.16, "International Character Sets" (1990).    This
  1800.        article discusses the new transfer protocol.
  1801. 0  11. ASCII  and  EBCDIC Character Set and Code Issues in Systems Applica-
  1802.        tions Architecture, SHARE white paper by Edwin Hart  (1989).    This
  1803.        document,  available as file SHARE REQUIRE from LISTSERV@JHUVM, lays
  1804.        out general considerations for character codes and translatability.
  1805. 12. IBM CICS KERMIT                                                      Page 39
  1806. 0-------------------------------------------------------------------------------
  1807.  2. IBM CICS KERMIT
  1808. 0Program:       John Chandler  (Harvard/Smithsonian  Center  for  Astrophysics);
  1809.                 contributions  from Vace Kundakci and Daphne Tzoar (Columbia U),
  1810.                 Brian Lesser (U. New Brunswick), Carrie Ledford (Miami U.), Jeff
  1811.                 Huestis  (Washington  U.), Wayne Mery (Lehigh U.), ICSTI, Pierre
  1812.                 Goyette (McGill U.), Clark  Frazier  (Harvard  Bus.  Sch.),  Bob
  1813.                 Bolch (Triangle), Andre Pirard (U. Liege)
  1814.  Language:      IBM/370 Assembler
  1815.  Documentation: John Chandler (CfA)
  1816.  Version:       4.2.2 (91/7/18)
  1817.  Date:          1991 July
  1818. 0
  1819.  Kermit-CICS Capabilities At A Glance:
  1820. 0  Local operation:                Yes
  1821.    Remote operation:               Yes
  1822.    Transfers text files:           Yes
  1823.    Transfers binary files:         Yes
  1824.    Wildcard send:                  Yes
  1825.    ^X/^Z interruption:             Yes (through micro)
  1826.    Filename collision avoidance:   Yes
  1827.    Can time out:                   No
  1828.    8th-bit prefixing:              Yes
  1829.    Repeat count prefixing:         Yes
  1830.    Alternate block checks:         Yes
  1831.    Terminal emulation:             No
  1832.    Communication settings:         No
  1833.    Transmit BREAK:                 No
  1834.    Packet logging:                 Yes
  1835.    Transaction logging:            Yes
  1836.    Session logging:                No
  1837.    Raw transmit:                   Yes (no prompts)
  1838.    Sliding window:                 No
  1839.    Long packets:                   Yes
  1840.    Act as server:                  Yes
  1841.    Talk to server:                 Yes
  1842.    Advanced server functions:      Yes
  1843.    Advanced commands for servers:  Yes
  1844.    Local file management:          Yes
  1845.    Handle Attribute Packets:       Yes
  1846.    Command/init files:             Yes
  1847.    Command macros:                 No
  1848. 0
  1849.  CICS Specifics of Kermit-370:
  1850. 0  Global INIT file:               KSYS.TD
  1851.    User INIT file:                 KINIT.TAKE
  1852.    Debug packet log:               KLOGterm.TS
  1853.    Server reply log:               KREPterm.TS
  1854.    Mail command:                   KERMAIL R(_...) filespec LIST(users)
  1855.    Print command:                  KERMPRT R(_...) filespec OPTIONS(options)
  1856.    Submit command:                 KERMSUB R(_...) filespec OPTIONS(options)
  1857.    Maximum packet size:            1913 (SERIES1), 1024 (TTY)
  1858. 12. IBM CICS KERMIT                                                      Page 40
  1859. 0-------------------------------------------------------------------------------
  1860.    Maximum disk LRECL:             32767
  1861. 0Kermit-CICS is a member of the generic Kermit-370 family and shares most of the
  1862.  features and capabilities of the group.  As its name  implies,  Kermit-CICS  is
  1863.  the  variant  of  Kermit-370  that runs under CICS.  As much as possible, it is
  1864.  designed to be independent of the operating system that runs CICS, but only  on
  1865.  IBM-370-compatible  machines.  The primary documentation for Kermit-CICS is ac-
  1866.  tually the chapter on Kermit-370 (entitled IBM  370  Kermit),  which  describes
  1867.  general  properties;  the  present  chapter assumes the reader is familiar with
  1868.  that material.  Only the details specific to CICS operation will  be  discussed
  1869.  here,  e.g.,  command  syntax relating to CICS data objects or commands not of-
  1870.  fered in general by Kermit-370.
  1871. 0
  1872.  2.1. CICS Data Objects
  1873. 0Unlike other environments for Kermit-370, CICS is not really an operating  sys-
  1874.  tem  and does not have anything that can be called a file system.  Nonetheless,
  1875.  CICS supports a variety of data objects that can be called "files".   Moreover,
  1876.  Kermit-CICS itself maintains a Kermit-only collection of storage organized into
  1877.  user directories.  Furthermore, Kermit simulates a set of CICS file-maintenance
  1878.  commands: DIRECTORY, TYPE, COPY, and DELETE.  Thus, for the purposes of Kermit,
  1879.  we may speak of a "CICS file system".  The  features  of  the  file  system  of
  1880.  greatest  interest  to Kermit users are the supported types of data object, the
  1881.  format of file specifications (or filespecs), and the concept of records.   The
  1882.  latter is described in the Kermit-370 chapter.
  1883. 0As  of this writing, Kermit-CICS supports three different types of data object:
  1884.  temporary storage (TS) queues, transient data (TD) queues,  and  Kermit-managed
  1885.  directory  members.  The first two are standard CICS objects while the third is
  1886.  a special kind of object designed for small, personalized,  infrequently  used,
  1887.  quasi-permanent  files,  such  as  on-line help files and individual Kermit in-
  1888.  itialization files.  In principle, Kermit also supports three other types,  but
  1889.  the  support  is  provided  through  an interface to external programs, none of
  1890.  which have yet been written.  These other types are non-TD pipes, spool  files,
  1891.  and native OS data sets.
  1892. 0The CICS filespec takes one of two forms:
  1893. 0  [fileclass/]filename[.filetype]
  1894. 0or
  1895. 0  'qualified.file.name
  1896. 0The  first  form represents a "normal" CICS data object while the second is the
  1897.  means of specifying a data object in the native operating system that  supports
  1898.  CICS.    In  the  first  form, the optional fileclass is a string of up to four
  1899.  characters.  The filename is the primary identifier for the file, but the  for-
  1900.  mats of both the fileclass and the filename depend on the filetype.  The latter
  1901.  must be one of a small set of supported types: PGM, SPOOL, TAKE, TD, TS,  TSAUX
  1902.  or  TSMAIN.  The last two are alternates for TS and are intended for specifying
  1903.  the type of storage desired for a new TS  queue.    The  default  is  Auxiliary
  1904.  storage.    Any  of the three types will serve equally well to identify a queue
  1905.  that already exists.  With filetypes "TD" and "TQ", the fileclass  is  meaning-
  1906.  less but may be specified anyway.
  1907. 12.1. CICS Data Objects                                                  Page 41
  1908. 0-------------------------------------------------------------------------------
  1909.  Kermit-CICS  supplies  a  default  filetype of "TS" for any received file if no
  1910.  filetype is provided by the remote system.  If no filename is supplied  either,
  1911.  Kermit  invents  one by concatenating the letter "K", a three-digit number, and
  1912.  the user's four-character CICS terminal id.  In any  case,  Kermit  forces  the
  1913.  filename  to  conform  to  CICS  rules by truncating it, if necessary, to eight
  1914.  characters (four for a TD queue).  Also, Kermit converts any lower-case letters
  1915.  to upper case.
  1916. 0Filetype  "TD"  refers to any kind of transient data queue.  TD queues are much
  1917.  like files in a true file system, except for two important features: TD  queues
  1918.  are  permanent  data objects (despite the transience of the data), and there is
  1919.  no straightforward means of determining how much storage a given TD  queue  oc-
  1920.  cupies.  These two features combine to defeat the provisions made by Kermit for
  1921.  handling filename collision (see SET FILE COLLISION in the Kermit-370 chapter).
  1922.  Intra-partition  queues, at least, have an associated number of queued records,
  1923.  but output extra-partition queues do not and therefore must always be  presumed
  1924.  to  contain data, i.e., to exist in a real sense.  Of course, all TD queues ex-
  1925.  ist insofar as they are pre-defined in the CICS DCT,  but  the  intent  of  the
  1926.  default  filename  collision  handling  is to protect data from erasure.  Thus,
  1927.  Kermit-CICS  will  not  normally  write  an  uploaded  file  into   an   output
  1928.  extra-partition  TD  queue at all.  Because of the filename collision, the file
  1929.  would be written to a TS queue, according to the algorithm described under  SET
  1930.  FILE  COLLISION in this chapter.  The only way of uploading to a TD queue is to
  1931.  change the COLLISION setting to APPEND or OVERWRITE.   Another  effect  of  the
  1932.  non-dynamic  quality  of  TD  queues is that Kermit, when presented with an un-
  1933.  defined TD queue name for an uploaded file, cannot create  the  missing  queue.
  1934.  Thus,  it  must behave as if there were a filename collision and find an alter-
  1935.  nate place to store the file.  However, if COLLISION were not  set  to  RENAME,
  1936.  Kermit  would  not even check for collisions, but would simply attempt to write
  1937.  to the undefined queue and stop the file transfer because of the resulting  I/O
  1938.  error.
  1939. 0Filetype  "PGM"  specifies  a  pipe managed by a CICS program whose name is the
  1940.  filename.  Such a program would be invoked to open the pipe, then  successively
  1941.  to read or write, and finally to close the pipe.  A single program can be writ-
  1942.  ten to manage both input and output, even perhaps both at the same time.    The
  1943.  optional  fileclass  in the filespec may be used by the program for any desired
  1944.  purpose.  See the installation guide for details about writing such a program.
  1945. 0Filetype "SPOOL" represents a special type of pipe.   The  filename  gives  the
  1946.  name of the desired spool file, and the program to be invoked is IKXDYNAL.  The
  1947.  optional fileclass is the spool class.
  1948. 0Filetype "TAKE" denotes a Kermit-managed directory  member.    Note  that  this
  1949.  filetype  is  not reserved for TAKE files, even though directory storage is the
  1950.  logical place to keep most TAKE files.  Throughout  this  chapter,  as  in  the
  1951.  other chapters on Kermit-370, the term "TAKE file" will always mean a file con-
  1952.  taining Kermit subcommands suitable for  execution  via  the  TAKE  subcommand,
  1953.  regardless  of  the filetype.  Data objects with filetype "TAKE" will be called
  1954.  "directory  members",  regardless  of  the  purpose  of  those  objects.    The
  1955.  fileclass,  if  any,  specifies the directory name (either "0000" to select the
  1956.  common directory or a userid to select a  personal  directory).    The  default
  1957.  directory  name  is  "*",  which  represents the userid of the current session.
  1958.  Userids in Kermit-CICS are determined according to an algorithm chosen as  part
  1959.  of  the  installation  process (e.g., the CICS operator id).  The filename of a
  1960.  member specifies that member within the given directory.   Obviously,  distinct
  1961. 12.1. CICS Data Objects                                                  Page 42
  1962. 0-------------------------------------------------------------------------------
  1963.  members  having  the same filename may exist simultaneously in different direc-
  1964.  tories.  In short, this Kermit-managed storage comes close to being a real file
  1965.  system,  aside  from  the  limitation  to the single filetype "TAKE".  For this
  1966.  reason, the Kermit  concept  of  the  "working  directory"  is  implemented  in
  1967.  Kermit-CICS primarily as the current directory associated with filetype "TAKE".
  1968.  However, there is an alternate use of the "working directory" concept,  namely,
  1969.  to  specify  a  default  prefix  for Qualified File Names (QFN's).  Selecting a
  1970.  "directory" name that begins with an apostrophe establishes that  string  as  a
  1971.  QFN  prefix for subsequent filespecs given to Kermit-CICS.  See the description
  1972.  of the CWD subcommand in this chapter for more details  about  "working  direc-
  1973.  tories".
  1974. 0Despite the apparent convenience and privacy of Kermit directory members, these
  1975.  objects are not intended for  routine  file  transfers,  but  only  for  small,
  1976.  quasi-permanent files.  The implementation makes use of a VSAM KSDS for storing
  1977.  the members and is geared entirely toward simplicity, rather  than  efficiency.
  1978.  Thus,  each record of a directory member is a separate record in the KSDS iden-
  1979.  tified by a human-readable 17-byte key consisting of the  directory  name,  the
  1980.  member  name,  and  the record number.  Reading or writing a large member could
  1981.  tie up significant amounts of system resources.  To ensure that  users  respect
  1982.  the restriction on directory members, Kermit imposes a two-tiered quota on each
  1983.  directory.  If the first limit is exceeded, no further members may  be  created
  1984.  in  the  offending directory until enough space has been freed by deleting mem-
  1985.  bers.  If the second limit is exceeded, Kermit will stop  writing  to  the  new
  1986.  member  immediately and will give a "disk full" error indication.  These limits
  1987.  apply equally to all directories.   The  limits  in  the  standard  version  of
  1988.  Kermit-CICS  are 100,000 and 150,000 bytes, respectively, but each installation
  1989.  is free to establish its own limits.
  1990. 0To provide compatibility with other operating systems, when Kermit-CICS sends a
  1991.  file,  it  ordinarily  makes a file header with only the filename and filetype.
  1992.  However, extra information may be added by way of the SET  FOREIGN  subcommand.
  1993.  In the case of a QFN, the last two tokens of the name are used for sending.
  1994. 0CICS  allows a group of files to be specified in a single filespec by including
  1995.  the special "wildcard" characters "*" and "%".  A "*"  matches  any  string  of
  1996.  characters  (even  a null string) within the filename; a "%" matches any single
  1997.  character.  Here are some examples:
  1998. 0  *.TS            All TS queues currently in CICS.
  1999. 0  F*.TD           All TD queues whose names start with F.
  2000. 0  0000/%%.TAKE    All system directory members with two-character names.
  2001. 0CICS files, like those in other IBM 370 systems, are record-oriented  (see  the
  2002.  introduction to the Kermit-370 chapter).  In particular, CICS files are charac-
  2003.  terized by record format (RECFM), which may be fixed-length or  varying-length,
  2004.  and by record length (LRECL).  Extra-partition TD queues are the only currently
  2005.  supported type of file that may have fixed-length records.  An important  point
  2006.  to  note  is  that records being written to a RECFM V data object are generally
  2007.  not limited in length by the current LRECL, but only by the CICS Kermit maximum
  2008.  (32767 bytes).  This is true of directory members and TS and intra-partition TD
  2009.  queues, but other limits may apply to other data objects.
  2010. 0Another file system feature of occasional interest is the  means  of  reporting
  2011. 12.1. CICS Data Objects                                                  Page 43
  2012. 0-------------------------------------------------------------------------------
  2013.  errors.   When Kermit-CICS encounters a file I/O error, it records the function
  2014.  name and the error code from EIBRCODE for inclusion in the STATUS report.   The
  2015.  explanations  of  EIBRCODE can be found in Appendix A of the CICS command-level
  2016.  reference manual.  In some cases, however, Kermit will report an error code for
  2017.  an  operation  not directly performed by CICS.  These extra codes have not been
  2018.  defined,  since  they  would  result  from  operations  on   as-yet-unsupported
  2019.  filetypes.
  2020. 0
  2021.  2.2. Program Operation
  2022. 0Kermit-CICS  is  a conversational transaction.  Thus, when it starts up, it al-
  2023.  locates and initializes buffers and storage arrays.  In  addition,  to  provide
  2024.  for  site-  and  user-specific  environments,  it  looks for two initialization
  2025.  files,  KSYS.TD  and  KINIT.TAKE.    The   file   KSYS.TD   is   a   read-only,
  2026.  extra-partition  TD  queue  maintained  by  a  systems  programmer.    The file
  2027.  KINIT.TAKE resides in the user's Kermit directory and must be maintained by the
  2028.  user.   For example, the file could be changed by downloading it to a microcom-
  2029.  puter, editing it there, and uploading it again (making sure to set  FILE  COL-
  2030.  LISION  to  OVERWRITE).    Alternatively,  if tools exist for editing TS queues
  2031.  within CICS, the file could be copied to a TS queue, edited, and copied back.
  2032. 0Kermit-CICS cannot time out while waiting for a packet.  The only way  to  time
  2033.  out is from the other side:  typing a carriage return to the local Kermit caus-
  2034.  ing it to retransmit its last packet, or an automatic timeout  as  provided  by
  2035.  many Kermits.
  2036. 0CICS  is  different  from  some other IBM mainframe systems in that it allows a
  2037.  program to take control  of  prompting  and  synchronization  on  "TTY"  lines.
  2038.  Kermit-CICS  takes  advantage of this option, and it is not necessary to enable
  2039.  handshaking on the micro Kermit before connecting to CICS.    Thus,  the  micro
  2040.  Kermit should have HANDSHAKE set OFF, and Kermit-CICS should have HANDSHAKE set
  2041.  to 0.  Since the generic Kermit-370 default  handshake  (XON)  is  retained  in
  2042.  Kermit-CICS, the subcommand "SET HANDSHAKE 0" is a good candidate for inclusion
  2043.  in KSYS.TD.
  2044. 0
  2045.  Interactive Operation:
  2046. 0To run Kermit-CICS interactively, invoke the program from CICS by  typing  KER-
  2047.  MIT.  When you see the prompt,
  2048. 0  Kermit-CICS>
  2049. 0you may type a Kermit subcommand.  When the subcommand completes, Kermit issues
  2050.  another prompt.  The cycle repeats until you exit from the program.    For  ex-
  2051.  ample:
  2052. 0  .KERMIT
  2053. 0  Kermit-CICS Version 4.2.2 (91/7/18)
  2054.    Enter ? for a list of valid commands
  2055. 0  Kermit-CICS>send foo*.ts
  2056. 0    TS queues with names beginning FOO are sent
  2057. 12.2. Program Operation                                                  Page 44
  2058. 0-------------------------------------------------------------------------------
  2059.    Kermit-CICS>receive test.td
  2060. 0    File is received and stored in the TD queue called TEST
  2061. 0  Kermit-CICS>exit
  2062. 0In  this example, which assumes a linemode session with a system prompt of ".",
  2063.  the text entered by the user is displayed along with messages and prompts.  The
  2064.  annotations are indented, but the distinction between user text and Kermit text
  2065.  may depend upon how this document is printed.  Normally, the  text  entered  by
  2066.  the user is underscored, and the messages and prompts are not.
  2067. 0The  prompt  string from Kermit-CICS is truly interactive.  In other words, the
  2068.  prompt appears only when fresh input is needed from the terminal.  If, for  ex-
  2069.  ample,  multiple  Kermit  subcommands  have been stacked up using the delimiter
  2070.  feature, the stack is read and executed before the next prompt appears.
  2071. 0
  2072.  Command Line Invocation:
  2073. 0Kermit-CICS may be invoked with command-line arguments  from  CICS.    The  ar-
  2074.  guments  (taken  to  be  the  string  beginning after the first blank after the
  2075.  four-letter transaction id "KERM") are interpreted as one or  more  subcommands
  2076.  to  be  executed  by  Kermit after completion of the initialization.  Thus, the
  2077.  command may be abbreviated as "KERM" or "KERMI" at the user's discretion.   For
  2078.  instance:
  2079. 0  .KERMIT send test.take
  2080. 0Kermit  will exit and return to CICS after completing the specified subcommand.
  2081.  A command line may contain up to 256 characters.    Note  that  the  subcommand
  2082.  delimiter is initially disabled in Kermit-CICS, but it can be enabled in either
  2083.  of the initialization files and can then be used for entering multiple  subcom-
  2084.  mands on the command line.
  2085. 0
  2086.  Non-interactive Operation:
  2087. 0Kermit-CICS is both a CICS transaction named KERM and a CICS program named KER-
  2088.  MIT.  As with any transaction, it may be started automatically as  well  as  by
  2089.  hand, but it will then read the terminal expecting to find the command-line ar-
  2090.  guments (if any) for execution as a Kermit subcommand.  In addition, Kermit may
  2091.  be invoked via the CICS LINK and XCTL commands and (optionally) supplied with a
  2092.  COMMAREA.
  2093. 0If there is no COMMAREA, Kermit reads the terminal just as if it  were  invoked
  2094.  as  a transaction.  If supplied, the COMMAREA is scanned, instead of a terminal
  2095.  buffer, for the command string.  Note that, if the COMMAREA does not begin with
  2096.  a  blank, the first blank-delimited word will be ignored in the same way as the
  2097.  transaction name in a terminal buffer.  In both  cases,  the  command-line  ar-
  2098.  guments  begin  with the first non-blank character after the first blank.  Once
  2099.  the command line is established, execution proceeds the same as if  Kermit  had
  2100.  been  started by hand; since Kermit exits as soon as it finishes the subcommand
  2101.  specified in the command string, there is no need to enter any  subcommands  at
  2102.  the terminal in this mode of operation.  Even so, Kermit should be given a ter-
  2103.  minal, since that provides the communication line for file transfer.
  2104. 12.2. Program Operation                                                  Page 45
  2105. 0-------------------------------------------------------------------------------
  2106.  When Kermit exits, if the given COMMAREA is at least seven bytes  long,  Kermit
  2107.  sets  a  return  or  completion  code  in the COMMAREA according to the current
  2108.  status.  See the table of error codes in the Kermit-370 chapter.    The  return
  2109.  code  takes  the following form: the characters "R(", a four-byte signed binary
  2110.  integer, and the character ")".  It is, thus, compatible  with  the  convention
  2111.  described below under the CICS subcommand.
  2112. 0
  2113.  Interface to mail, print, and batch
  2114. 0Unlike  many other IBM/370 environments, CICS does not provide a standard means
  2115.  of returning a completion code from  an  invoked  program.    As  the  previous
  2116.  paragraph  indicates,  Kermit-370  has adopted its own standard, using the COM-
  2117.  MAREA, and this applies to the calling sequences for the commands  that  handle
  2118.  electronic  mail,  print  files,  and batch jobs.  Thus, the "R(_...)" shown in
  2119.  those sequences at the beginning of this chapter is not to be considered as  an
  2120.  option, but as a required part of the COMMAREA to allow room for a return code.
  2121.  Consequently, when Kermit-CICS calls  one  of  those  programs  to  verify  the
  2122.  feasibility  of  that  kind of file disposition, the COMMAREA consists of seven
  2123.  bytes, rather than none.  See below under the HOST subcommand for more  details
  2124.  about invoking CICS programs from Kermit.
  2125. 0
  2126.  Server mode:
  2127. 0Command  execution  in  server  mode is different in three respects from normal
  2128.  operation.  First, some Kermit subcommands are not allowed  (see  the  list  of
  2129.  subcommands  in  the  Kermit-370  chapter).  Second, command errors always ter-
  2130.  minate any active TAKE file.  Third, Kermit intercepts its terminal output  and
  2131.  transmits  the  data  to  the local Kermit as text packets.  However, any other
  2132.  programs that wish to write to the terminal will do so, and such messages never
  2133.  appear to the local Kermit (except, perhaps, as bad packets).
  2134. 0
  2135.  2.3. Kermit-CICS Subcommands
  2136. 0Kermit-CICS  supports  all the subcommands described in the Kermit-370 chapter.
  2137.  In addition, there is the system-specific subcommand "CICS", which is a synonym
  2138.  for  the  generic  subcommand  "HOST".  "CICS" can be issued as a remote Kermit
  2139.  command when Kermit-CICS is in server mode.
  2140. 0This section concentrates on the subcommands that have special form or  meaning
  2141.  for  Kermit-CICS.    These  are  ordered  alphabetically.    See the chapter on
  2142.  Kermit-370 for further details.
  2143. 0
  2144.                                THE CICS SUBCOMMAND
  2145. 0Syntax: CICS text of command
  2146. 0Kermit-CICS supports two kinds of "system" commands.  Both kinds are designated
  2147.  by  the  prefix  "CICS"  or  "HOST",  even  though  neither kind can be invoked
  2148.  directly from a CICS session.  The first word of the command string is taken to
  2149.  be  the name of the command.  Kermit first checks whether the name is in a list
  2150.  of simulated CICS functions (and their abbreviations).  If  so,  Kermit  itself
  2151.  simulates the function.  The available functions are DIRECTORY, TYPE, COPY, and
  2152. 12.3. Kermit-CICS Subcommands                                            Page 46
  2153. 0-------------------------------------------------------------------------------
  2154.  DELETE.  DIRECTORY and TYPE are identical to the corresponding  Kermit  subcom-
  2155.  mands.    COPY  has  a  straightforward  syntax (old filespec followed by new);
  2156.  DELETE is even simpler (just the desired filespec).  DELETE and DIRECTORY  have
  2157.  no special options, but COPY and TYPE offer one: the source filespec may have a
  2158.  range of line numbers (in the  same  syntax  as  the  SEND  subcommand)  to  be
  2159.  copied/typed  instead of the entire file.  All four functions are applicable to
  2160.  the same data objects as KERMIT SEND and RECEIVE, but none of the  four  recog-
  2161.  nize  wildcards.  No RENAME function is implemented, although that command name
  2162.  is reserved.  If the command name is not found in the  list  of  special  func-
  2163.  tions,  Kermit  attempts  to invoke a CICS program of that name with a COMMAREA
  2164.  consisting of the remainder of the command string.  The CICS commands  used  in
  2165.  command-level  programming  are  not  supported.  Kermit detects numeric return
  2166.  codes from co-operating invoked programs by examining the COMMAREA upon return.
  2167.  If  the  first  two bytes are the string "R(", the seventh byte is ")", and the
  2168.  third byte is the same as the fourth, the string of bytes three though  six  is
  2169.  taken  to  be  a  binary fullword return code.  The conditions are sufficiently
  2170.  restrictive that "accidental" return codes are very rare (one  chance  in  four
  2171.  billion,  assuming  totally  random bytes, but probably less than that in prac-
  2172.  tice).  A negative code is taken to mean that the  host  command  was  actually
  2173.  "illegal"  in some sense, a zero code means that the command completed success-
  2174.  fully, and a positive code means that the command encountered an error of  some
  2175.  kind  while  executing.    Positive  codes are reported to the user in the form
  2176.  "R(number)", where the numeric value is given in decimal.
  2177. 0
  2178.                                THE CWD SUBCOMMAND
  2179. 0Syntax: CWD directory or 'prefix
  2180. 0The CWD (Change Working Directory) subcommand establishes a new default  direc-
  2181.  tory  or  specifies  a  default prefix for Qualified File Names.  The specified
  2182.  name is normally the four-character  userid  associated  with  a  directory  in
  2183.  Kermit-managed  storage.    However,  if  the  name is omitted, this resets the
  2184.  directory to "*", which is a synonym for the  session  userid.    If  the  name
  2185.  begins  with  an  apostrophe,  that establishes the use of Qualified File Names
  2186.  with the given string as prefix.    When  a  QFN  prefix  is  established,  any
  2187.  filespec given to Kermit-CICS without an explicit fileclass (directory) will be
  2188.  appended to the current prefix and interpreted as a QFN, rather than as a  nor-
  2189.  mal  CICS  data object name.  When a fileclass is given explicitly, even if the
  2190.  fileclass is ignored (as in the case of TD and TS queues), that  overrides  the
  2191.  presumption of a QFN.  Thus, while the CWD subcommand allows the convenience of
  2192.  an abbreviated notation for both QFN's and normal data object names, the under-
  2193.  lying  syntax  always permits the specification of any desired file by spelling
  2194.  out the filespec in full.  For example, if the current prefix  is  "'AAA1234.",
  2195.  the  QFN  "'AAA1234.OLD.TAKE'"  may  be abbreviated as just "OLD.TAKE", but the
  2196.  system initialization file can still be specified (as "*/KSYS.TD").  Similarly,
  2197.  if  the  prefix  is "*", i.e., the session default directory name, the same QFN
  2198.  must be spelled out in full, while the filespec "OLD.TAKE" would refer to  mem-
  2199.  ber "OLD" in the user's directory.
  2200. 12.3. Kermit-CICS Subcommands                                            Page 47
  2201. 0-------------------------------------------------------------------------------
  2202.                             THE DIRECTORY SUBCOMMAND
  2203. 0Syntax: DIRECTORY filespec
  2204. 0The DIRECTORY subcommand displays attributes of one or more files (name, LRECL,
  2205.  RECFM, size, type, and date).  The filespec may have wildcard characters if  it
  2206.  refers  to members of the current working directory or to TS or TD queues.  For
  2207.  TD queues, the type is displayed as "EXTRA", "INTRA", "REMOTE", or  "INDIRECT",
  2208.  and  the  type  for  all other data objects is "OTHER".  The size is displayed,
  2209.  where possible, in two forms, both the number of records and the  total  number
  2210.  of  bytes (rounded to the nearest kilobyte).  If either of those sizes is shown
  2211.  as zero, it may simply mean that Kermit was unable to obtain the  required  in-
  2212.  formation,  e.g., for main-storage TS queues in CICS under MVS/ESA.  A value of
  2213.  zero for the LRECL means that the only limit is 32767.  Similarly, if the  date
  2214.  is unavailable (often the case), it will simply be omitted.
  2215. 0
  2216.                                THE GIVE SUBCOMMAND
  2217. 0Syntax: GIVE table-name filespec
  2218. 0This  subcommand  compares  the named translation table with its default values
  2219.  and saves the differences in a TAKE file named filespec.  The filespec has  the
  2220.  usual  format,  except  that  the default filetype is "TAKE", rather than "TS".
  2221.  See the Kermit-370 chapter for a fuller description of this subcommand.
  2222. 0
  2223.                                THE HELP SUBCOMMAND
  2224. 0Syntax: HELP [subcommand]
  2225. 0This subcommand displays a message that explains the specified Kermit-CICS sub-
  2226.  command.    If  no subcommand is given, the message explains the Kermit command
  2227.  itself.  These messages are stored in the Kermit-managed storage in the  common
  2228.  directory.
  2229. 0
  2230.                              THE RECEIVE SUBCOMMAND
  2231. 0Syntax: RECEIVE [filespec]
  2232. 0The RECEIVE subcommand tells Kermit to receive one or more files from the other
  2233.  system.  You must issue the corresponding SEND subcommand to the other Kermit.
  2234. 0If the optional filespec is omitted, Kermit-CICS will use the name(s)  provided
  2235.  by  the  other Kermit.  If that name is not a legal CICS file name, Kermit-CICS
  2236.  will delete excess characters, if any.  If the filetype  is  illegal,  however,
  2237.  Kermit  will  reject  the  file.  Wildcards may not be used.  A filespec in the
  2238.  subcommand indicates what name the incoming file should be given.  If  the  op-
  2239.  tional  filespec  is  provided,  but more than one file arrives, the first file
  2240.  will be stored under the given filespec, and the remainder will be stored under
  2241.  their own names, as provided by the other Kermit.
  2242. 0For  purposes  of  truncation  and  folding,  the  maximum  record length for a
  2243.  received file depends on the file type and the  filetype.    BINARY  files  are
  2244.  folded  at  the  current LRECL, but TEXT files may have a maximum size of 32767
  2245. 12.3. Kermit-CICS Subcommands                                            Page 48
  2246. 0-------------------------------------------------------------------------------
  2247.  (TS queues and Kermit directory members do, as do TD queues with varying-length
  2248.  records).
  2249. 0If  the  incoming  file has the same name as an existing file, the action taken
  2250.  depends on the FILE COLLISION setting.  The possible settings and  their  mean-
  2251.  ings  are  given  in  the  Kermit-370 chapter.  Two of the settings (BACKUP and
  2252.  RENAME) require that  Kermit-CICS  change  the  incoming  name  so  as  not  to
  2253.  obliterate  a  pre-existing file.  It attempts to find a unique name by succes-
  2254.  sively modifying the original and checking for the existence of such a file  at
  2255.  each  step.   The procedure begins by truncating the filename to six characters
  2256.  if necessary and then appending "$0"  and  changing  any  filetype  other  than
  2257.  "TAKE"  to  "TS".   If a file by that name exists, Kermit then replaces the "0"
  2258.  with a "1".  It continues in this manner up to "9", and if an unused name  can-
  2259.  not  be found, the transfer fails.  In Kermit-CICS, the default setting of FILE
  2260.  COLLISION is RENAME, which causes the new file to be stored under the  modified
  2261.  name.  The BACKUP option is not supported by Kermit-CICS.
  2262. 0
  2263.                                THE SEND SUBCOMMAND
  2264. 0Syntax: SEND [filespec[<options>] [foreign-filespec]][, ...]
  2265. 0The  SEND subcommand causes one or more files to be sent from CICS to the other
  2266.  system.  For details on the  options,  see  the  description  of  SEND  in  the
  2267.  Kermit-370  chapter.    Note  that  no  blanks  may  intervene between the CICS
  2268.  filespec and the options.
  2269. 0If the filetype is "TD", "TS", or "TAKE", the filename may contain the wildcard
  2270.  characters  "*"  or  "%".  Wildcards are valid with "TAKE" only for the current
  2271.  directory.  If wildcards are used, all eligible matching files  will  be  sent.
  2272.  Note  that  wildcard  specification  for TS queues cannot be guaranteed to work
  2273.  correctly, since CICS is a multi-user environment,  and  the  system  chain  of
  2274.  queues  can be modified dynamically while Kermit is following the chain looking
  2275.  for matches.  The result might be to skip one or more files,  to  send  a  file
  2276.  more  than  once, or to attempt sending a non-existant queue (cutting short the
  2277.  transfer with an I/O error message).
  2278. 0The foreign-filespec, if any, is used for the file header of the outgoing file,
  2279.  replacing  the usual "name.type" copied from the CICS filespec.  Normally, this
  2280.  form of the SEND subcommand is used only when the filespec  has  no  wildcards,
  2281.  since  the  foreign-filespec  is  used only for the first file of a group (sub-
  2282.  sequent files having default headers).  If both filespecs are omitted for  this
  2283.  subcommand,  Kermit  will  prompt  separately for each.  This prompting mode is
  2284.  especially useful when more than one file (or file group) is to be sent,  since
  2285.  the command line is limited to 130 characters.
  2286. 0Trailing  blanks  in  a  text  file with RECFM F are deemed superfluous and are
  2287.  stripped off when Kermit-CICS downloads the file.    In  order  to  treat  such
  2288.  blanks  as  significant,  you must convert the record format to V by using, for
  2289.  example, the Kermit HOST COPY subcommand to move the file to a TS queue.
  2290. 12.3. Kermit-CICS Subcommands                                            Page 49
  2291. 0-------------------------------------------------------------------------------
  2292.                                THE SET SUBCOMMAND
  2293. 0Syntax: SET parameter [value]
  2294. 0The SET subcommand establishes or modifies various parameters controlling  file
  2295.  transfers.   The following SET parameters are available in Kermit-CICS, but not
  2296.  universally in Kermit-370:
  2297. 0DELIMITER           character for terminal input.
  2298.  FILE
  2299.    LRECL             Logical Record length for incoming file.
  2300.    RECFM             Record format for incoming files.
  2301.  PREFIX              New directory.
  2302. 0
  2303.  SET DELIMITER
  2304. 0Syntax: SET DELIMITER character
  2305. 0This subcommand is defines a character to be interpreted as the logical end  of
  2306.  an  input  command  line  (for  the  purpose of entering multiple commands on a
  2307.  single line).  This is used only for commands entered at the terminal  and  has
  2308.  no  effect on commands contained in TAKE files.  The delimiter is initially un-
  2309.  defined, but it can be set in one of the initialization files  and  thereby  be
  2310.  used in parsing the initial command-line arguments.
  2311. 0
  2312.  SET FILE COLLISION
  2313. 0Syntax: SET FILE COLLISION option
  2314. 0Unlike most other variants of Kermit-370, Kermit-CICS has RENAME as the default
  2315.  value for FILE COLLISION.  As a consequence, the usual mode  of  operation  for
  2316.  receiving  a  file that already exists (or appears to exist, as extra-partition
  2317.  TD queues always do), is to assign a new and unique name and save the file as a
  2318.  TS  queue.   If you really want to upload into an extra-partition TD queue, you
  2319.  must first SET FILE COLLISION OVERWRITE or APPEND,  whichever  is  appropriate.
  2320.  Actually,  if the queue in question already exists but is closed, these two op-
  2321.  tions have the same effect, which is to overwrite the queue.
  2322. 0
  2323.  SET FILE LRECL
  2324. 0Syntax: SET FILE LRECL number
  2325. 0This sets the logical record length for incoming files to a number  from  1  to
  2326.  32767  (32K-1).   This variable is used only for fixed-format and binary files.
  2327.  However, the only  currently  supported  type  of  fixed-format  files  is  the
  2328.  extra-partition  TD queue, which does not allow Kermit to alter the pre-defined
  2329.  LRECL.  The default is 80.
  2330. 12.3. Kermit-CICS Subcommands                                            Page 50
  2331. 0-------------------------------------------------------------------------------
  2332.  SET FILE RECFM
  2333. 0Syntax: SET FILE RECFM option
  2334. 0This sets the record format to use for incoming files.  Valid options are  "Un-
  2335.  defined",  "Fixed",  and  "Variable"  (the  default).  Fixed-format records are
  2336.  padded, folded, or truncated, as needed, to the current LRECL.  Most  kinds  of
  2337.  files,  in  fact, cannot be anything but variable.  There is no current use for
  2338.  this subcommand, since the only files that can have  fixed-length  records  are
  2339.  not  affected by the Kermit setting.  However, there may be future applications
  2340.  for as-yet-unsupported filetypes.
  2341. 0
  2342.  SET PREFIX
  2343. 0Syntax: SET PREFIX string
  2344. 0This subcommand is equivalent to the CWD  subcommand  (q.v.).    Issuing  "SHOW
  2345.  PREFIX" will not reveal the name of the default directory, since that is called
  2346.  by its alias "*".  You must use the SPACE subcommand instead (q.v.).  There  is
  2347.  no mechanism for displaying the list of all existing directories.
  2348. 0
  2349.                               THE SPACE SUBCOMMAND
  2350. 0Syntax: SPACE
  2351. 0This  subcommand  displays  the storage allocation in the current directory and
  2352.  the allowed quota.  If there is no current directory, i.e., if a QFN prefix has
  2353.  been selected, the response is "No directory defined".
  2354. 0
  2355.                                THE TAKE SUBCOMMAND
  2356. 0Syntax: TAKE filespec
  2357. 0Execute Kermit subcommands from the specified file.  The filespec has the usual
  2358.  format, except that the default filetype is "TAKE", rather than "TS".
  2359. 0
  2360.  2.4. How to build an executable Kermit-CICS
  2361. 0Before attempting to build Kermit-CICS, look in the Kermit  distribution  under
  2362.  IKXKER  for  the  installation  document, as well as "beware", help, and update
  2363.  files, and read them first.  They will probably  contain  information  that  is
  2364.  more  current  than what you see here.  Indeed, the process of applying the up-
  2365.  dates is complicated enough that it cannot be adequately described here.    The
  2366.  installation  document  IKXKER.INS  contains a full description of the process,
  2367.  including batch jobs for carrying out the various steps.  You will need to  ex-
  2368.  tract  the  JCL  and  submit  it (suitably tailored to your local environment).
  2369.  These jobs apply the updates, pass the source through the command-level  trans-
  2370.  lator  and the assembler, and finally link the program into an executable phase
  2371.  or load module.
  2372. 0If your site's ASCII/EBCDIC translation table for TTY lines does not conform to
  2373.  the  one listed in the appendix (which in turn conforms to the one given in the
  2374. 1IBM System/370 Kermit                                                   Page 51
  2375. 0-------------------------------------------------------------------------------
  2376.  IBM  System/370  Reference   Summary),   then   enter   the   appropriate   SET
  2377.  ATOE/ETOA/TATOE/TETOA  subcommands  in KSYS.TD.  The generic Kermit-370 chapter
  2378.  includes an invertible 256-entry translation table and  describes  a  procedure
  2379.  for  determining  what  SET  subcommands  are  needed.    NOTE:  If your site's
  2380.  ASCII/EBCDIC translation is not invertible for at least 96 entries, Kermit will
  2381.  not and cannot work.
  2382. 0
  2383.  2.5. What's Missing
  2384. 0Release 4.2.2 of Kermit-CICS is a test release, the first version of Kermit-370
  2385.  for CICS.  As such, it has all the basics, but several features either have not
  2386.  been  fully  tested or have not yet been implemented.  Work on Kermit-CICS will
  2387.  continue.  Features that need to be improved or added include:
  2388. 0   - IKXDYNAL for both CICS/VSE and CICS/MVS.  The former  would  probably
  2389.       support  only  spool  files, but the latter should support both spool
  2390.       files and MVS data sets (QFN's).
  2391. 0   - Sample exit routines for supporting  userid  algorithms  besides  the
  2392.       OPID and TERM options.
  2393. 0   - Sample package of security exit routines.
  2394. 0   - Support for data objects on a remote CICS.
  2395. 0   - Cleaner  performance  of server-mode BYE function, dependent on local
  2396.       conventions.
  2397. 0   - Support for indirect TD queues.
  2398. 0   - Testing linemode operation.
  2399. 0   - Mechanism for flushing terminal output from Kermit (such as  for  the
  2400.       TYPE subcommand).
  2401. 0   - Mechanism for collecting "terminal" output from invoked programs.
  2402. 0   - Testing under CICS/VM.
  2403. 0   - SET REPEAT subcommand.
  2404. 0   - Automatic  conversion  of  EBCDIC printer carriage control into ASCII
  2405.       control characters.
  2406. 0   - CONNECT subcommand.  This may be impossible.
  2407. 0Anyone interested in working on these or other improvements should first get in
  2408.  touch  with  the Center for Computing Activities at Columbia University to find
  2409.  out if someone else has already begun a similar project (and, if so, who).
  2410. 1IBM System/370 Kermit                                                   Page 52
  2411. 0-------------------------------------------------------------------------------
  2412.  Index
  2413. 0          3174   1, 16                    EBCDIC-to-ASCII   15
  2414.            3708   16                       ECHO   10
  2415.                                                 See  also   Command echo-
  2416.            Alternate lines   23                    ing
  2417.            Appending   20                  Eighth-bit prefix   26, 28
  2418.            ASCII-to-EBCDIC   15            Electronic mail   8, 45
  2419.            Attributes.   See   File   at-  End of file   19
  2420.                    tributes                Error codes   35, 42
  2421.            Automatic operation   44        Extended ASCII   15
  2422. 0          Batch jobs   8, 45, 50          File attributes   2, 16, 29
  2423.            Binary files   1, 12, 21        File disposition   8
  2424.            Blanks                          File management   45
  2425.               preserving  trailing    22,  File renaming   20
  2426.                    48                      File truncation   19
  2427.               stripping   2, 22, 23        Fileclass   40, 41, 46
  2428.               trailing   2, 23             Filename collision    20,  41,
  2429.            BLKSIZE   2                             48, 49
  2430.            Block check   16                Flow control   31
  2431.                                            Folding   12, 21, 48
  2432.            Cancelling  a  file   transfer  Foreign   9, 22
  2433.                    13                      Front end   1
  2434.            Character sets   3, 19, 25, 26  Full screen   11, 31
  2435.            CICS   18, 20, 39, 40
  2436.            CICS command level   46, 50     GET   10
  2437.            CMS   18, 20                    GIVE   11, 47
  2438.            Code pages   3                  Greek   3, 25
  2439.                 See also   Character sets
  2440.            Collision.  See  Filename col-  Handshake   22, 31, 43
  2441.                    lision                  Hebrew   3, 25
  2442.            Command echoing   25, 31        HELP   47
  2443.            Command level. See  CICS  com-  Host commands   11, 24, 45
  2444.                    mand level
  2445.            Command prefix   9, 11, 24      IBM   1, 40
  2446.            Completion codes   35, 45       Incomplete files   12, 23
  2447.                 See also   Error codes     Initialization  files    2, 7,
  2448.            Controller   16                         8, 20, 25, 27, 39, 40,
  2449.            COPY   46                               43, 50
  2450.            CRLF   2, 21
  2451.            CSW   18                        Kanji   3, 20, 25
  2452.            CWD   46                        Katakana   3, 25
  2453.            Cyrillic   3, 20, 25
  2454.                                            Languages   3
  2455.            Debugging   17                  Local   9
  2456.            DELETE   46                     LOCAL-ECHO   31
  2457.            Delimiter   49                  Log files   39
  2458.            Directories   41, 46, 50        Long packets   12, 27, 30
  2459.            DIRECTORY   45, 47              LRECL   2, 22, 39
  2460.            Discarding files   20, 23, 37
  2461.                 See also   DELETE          Mail   8
  2462.            DOS-4   2                            See  also      Electronic
  2463.            Dumping storage   17                    mail
  2464.                                            Margins   23
  2465. 1IBM System/370 Kermit                                                   Page 53
  2466. 0-------------------------------------------------------------------------------
  2467.            MTS   2                         TEST   25
  2468.            MUSIC   18, 20                  TGET   18
  2469.                                            Timeout   24, 29, 32
  2470.            Optimum packet size   13, 24    TPUT   18
  2471.            Overwriting files   21          Tracing execution   18
  2472.                 See also   Filename  col-  Trailing blanks. See Blanks
  2473.                    lision                  Transaction log   12, 31
  2474.                                            Translation   1, 3, 26
  2475.            Packet size   13, 27            Translation tables     3,  11,
  2476.            Parity   28, 31                         25, 47, 50
  2477.            Pipes   41                      Transparent mode   10, 31
  2478.            Prefix.      See      Command,  Truncation   12, 21, 48
  2479.                    Eighth-bit, Foreign          See  also      File trun-
  2480.            Printing files   8, 45                  cation
  2481.            Prompt   23                     TS queues   40
  2482.                                            TSO   18, 20
  2483.            Qualified File Names   40, 42,  TTY   1, 16, 31, 40, 43
  2484.                    46, 50                  Type   12, 14, 45
  2485.            Queues
  2486.                 See also   TD, TS          Userids   41
  2487.            Quotas   42
  2488.            Quote. See Prefix               Warning   20
  2489.                                            Wildcards   42, 48
  2490.            Raw transmission   10, 31
  2491.            RECEIVE   10, 12, 47            XECHO   10
  2492.            RECFM   2, 50
  2493.            Records   2
  2494.            Remote   9
  2495.            RENAME   20, 46
  2496.            Renaming files   20
  2497.                 See also   File renaming
  2498.            ROSCOE   18, 20
  2499. 0          Screen refresh   32
  2500.            SEND   10, 12, 48
  2501.            SEND delay   19
  2502.            Series/1   1, 16, 40
  2503.            SERVER   13
  2504.            SET   14, 49
  2505.            SHOW   29
  2506.            SNA   1, 16
  2507.            SPACE   50
  2508.            Spool files   41
  2509.            STATUS   30
  2510.            STOP   30
  2511.            Stripping blanks. See Blanks
  2512.            Subcommand prefix. See Command
  2513.                    prefix
  2514.            Submitting jobs   8
  2515.                 See also   Batch jobs
  2516. 0          Tabs   24
  2517.            TAKE   31, 41, 50
  2518.            TAKE files   41
  2519.            TD queues   41, 49
  2520.            TDUMP   31
  2521. +
  2522.